From 9bce1b80a4200d1ea130007201627d3786941820 Mon Sep 17 00:00:00 2001 From: andrewpeng02 Date: Wed, 29 Nov 2023 11:46:41 -0500 Subject: [PATCH] beginner project part 2 --- frontend/package.json | 3 +++ frontend/src/common/components/Footer.tsx | 5 ++++- frontend/src/common/components/NavBarMain.tsx | 2 +- frontend/src/constants.ts | 2 +- .../Tabular/components/TabularFlow.tsx | 5 +++-- .../components/TabularParametersStep.tsx | 21 +++++++++++++++++++ .../features/Tabular/redux/tabularApi.ts | 1 + .../features/Tabular/types/tabularTypes.ts | 1 + frontend/src/pages/login.tsx | 1 + 9 files changed, 36 insertions(+), 5 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index ba917dcc9..06b112945 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -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", @@ -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", diff --git a/frontend/src/common/components/Footer.tsx b/frontend/src/common/components/Footer.tsx index c1a07eb61..aadb0aa37 100644 --- a/frontend/src/common/components/Footer.tsx +++ b/frontend/src/common/components/Footer.tsx @@ -2,6 +2,8 @@ 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: { @@ -9,7 +11,7 @@ const theme = createTheme({ styleOverrides: { root: { fontSize: 40, - color: COLORS.dark_blue + color: COLORS.dark_blue, }, }, }, @@ -25,6 +27,7 @@ const Footer = () => { id="footer-socials" data-testid="footer-socials" > + { {isSignedIn(user) ? ( - Train + Hello World ) : null} diff --git a/frontend/src/constants.ts b/frontend/src/constants.ts index 4ff358e95..15e114a6d 100644 --- a/frontend/src/constants.ts +++ b/frontend/src/constants.ts @@ -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/", diff --git a/frontend/src/features/Train/features/Tabular/components/TabularFlow.tsx b/frontend/src/features/Train/features/Tabular/components/TabularFlow.tsx index e56e6b428..822e5b9ff 100644 --- a/frontend/src/features/Train/features/Tabular/components/TabularFlow.tsx +++ b/frontend/src/features/Train/features/Tabular/components/TabularFlow.tsx @@ -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; @@ -282,7 +283,7 @@ const ROOT_NODE: Node = { position: { x: DEFAULT_X_POSITION, y: 0 }, deletable: false, data: { - label: "Start", + label: "Beginning", value: "root", parameters: [], onChange: () => undefined, diff --git a/frontend/src/features/Train/features/Tabular/components/TabularParametersStep.tsx b/frontend/src/features/Train/features/Tabular/components/TabularParametersStep.tsx index ab33fbe27..b499e7a2d 100644 --- a/frontend/src/features/Train/features/Tabular/components/TabularParametersStep.tsx +++ b/frontend/src/features/Train/features/Tabular/components/TabularParametersStep.tsx @@ -102,6 +102,27 @@ const TabularParametersStep = ({ ) : ( <> + + Test radio group + ( + + } + label="Option 1" + /> + } + label="Option 2" + /> + + )} + /> + { + console.log("trainspace_id", response.trainspace_id); return { trainspaceId: response.trainspace_id, }; diff --git a/frontend/src/features/Train/features/Tabular/types/tabularTypes.ts b/frontend/src/features/Train/features/Tabular/types/tabularTypes.ts index cc326100e..eb9f2db94 100644 --- a/frontend/src/features/Train/features/Tabular/types/tabularTypes.ts +++ b/frontend/src/features/Train/features/Tabular/types/tabularTypes.ts @@ -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"]; diff --git a/frontend/src/pages/login.tsx b/frontend/src/pages/login.tsx index 4bc45f4e0..43f2d0752 100644 --- a/frontend/src/pages/login.tsx +++ b/frontend/src/pages/login.tsx @@ -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]);