Skip to content

Commit

Permalink
beginner project part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewpeng02 committed Nov 29, 2023
1 parent 13d1957 commit 9bce1b8
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 5 deletions.
3 changes: 3 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
"@dnd-kit/sortable": "^7.0.2",
"@emotion/react": "^11.10.0",
"@emotion/styled": "^11.10.0",
"@fortawesome/free-brands-svg-icons": "^6.5.0",
"@fortawesome/react-fontawesome": "^0.2.0",
"@mui/icons-material": "^5.11.16",
"@mui/material": "^5.9.3",
"@mui/x-data-grid": "^6.0.4",
Expand Down Expand Up @@ -37,6 +39,7 @@
"crypto-js": "^4.1.1",
"file-saver": "^2.0.5",
"firebase": "^9.9.3",
"font-awesome": "^4.7.0",
"gestalt": "^101.3.9",
"gestalt-datepicker": "^101.3.9",
"jszip": "^3.10.1",
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/common/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@ import React from "react";
import { COLORS, URLs } from "../../constants";
import { LinkedIn, YouTube, Instagram, GitHub } from "@mui/icons-material";
import { ThemeProvider, createTheme } from "@mui/material/styles";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faReact } from "@fortawesome/free-brands-svg-icons";

const theme = createTheme({
components: {
MuiSvgIcon: {
styleOverrides: {
root: {
fontSize: 40,
color: COLORS.dark_blue
color: COLORS.dark_blue,
},
},
},
Expand All @@ -25,6 +27,7 @@ const Footer = () => {
id="footer-socials"
data-testid="footer-socials"
>
<FontAwesomeIcon icon={faReact} size="2x" />
<a
className="foot-element"
data-testid="linkedin-icon"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/common/components/NavBarMain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const NavbarMain = () => {
<Grid item>
{isSignedIn(user) ? (
<Link href="/train" passHref className="nav-link">
Train
Hello World
</Link>
) : null}
</Grid>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const COLORS = Object.freeze({
});

export const URLs = Object.freeze({
donate: "https://buy.stripe.com/9AQ3e4eO81X57y8aEG",
donate: "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
linkedin: "https://www.linkedin.com/company/dsgt/",
youtube: "https://www.youtube.com/channel/UC1DGL6Tb9ffwC-aHChadxMw",
instagram: "https://www.instagram.com/datasciencegt/",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ interface OnChangeArgs {
interface LayerNodeData {
label:
| (typeof STEP_SETTINGS.PARAMETERS.layers)[ALL_LAYERS]["label"]
| "Start";
| "Start"
| "Beginning";
value: ALL_LAYERS | "root";
parameters?: number[];
onChange: (args: OnChangeArgs) => void;
Expand All @@ -282,7 +283,7 @@ const ROOT_NODE: Node<LayerNodeData> = {
position: { x: DEFAULT_X_POSITION, y: 0 },
deletable: false,
data: {
label: "Start",
label: "Beginning",
value: "root",
parameters: [],
onChange: () => undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,27 @@ const TabularParametersStep = ({
</>
) : (
<>
<FormControl>
<FormLabel>Test radio group</FormLabel>
<Controller
name="testRadio"
control={control}
render={({ field: { onChange, value } }) => (
<RadioGroup row value={value} onChange={onChange}>
<FormControlLabel
value="option 1"
control={<Radio />}
label="Option 1"
/>
<FormControlLabel
value="option 2"
control={<Radio />}
label="Option 2"
/>
</RadioGroup>
)}
/>
</FormControl>
<Controller
control={control}
name="targetCol"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const tabularApi = backendApi.injectEndpoints({
},
}),
transformResponse: (response: { trainspace_id: string }) => {
console.log("trainspace_id", response.trainspace_id);
return {
trainspaceId: response.trainspace_id,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export interface TrainspaceResultsData extends TrainspaceData<"TRAIN"> {
}

export interface ParameterData {
testRadio: string;
targetCol: string;
features: string[];
problemType: (typeof STEP_SETTINGS)["PARAMETERS"]["problemTypes"][number]["value"];
Expand Down
1 change: 1 addition & 0 deletions frontend/src/pages/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ const Login = () => {
const dispatch = useAppDispatch();
useEffect(() => {
if (router.isReady && isSignedIn(user)) {
console.log(user.email);
router.replace({ pathname: "/dashboard" });
}
}, [user, router.isReady]);
Expand Down

0 comments on commit 9bce1b8

Please sign in to comment.