From d8470f0573b31c8f914bcaf9f551269106be1939 Mon Sep 17 00:00:00 2001 From: Dennis Chen Date: Wed, 12 Jun 2024 09:58:58 -0700 Subject: [PATCH] finish frontend FUNCTIONALITY (still looks bad) --- frontend/src/App.tsx | 48 +++--- .../src/components/auth/AuthComponent.tsx | 38 ----- .../components/auth/AuthenticationModal.tsx | 15 +- .../components/auth/GoogleAuthComponent.tsx | 89 ----------- frontend/src/components/nav/TopNavbar.tsx | 13 +- frontend/src/hooks/api.tsx | 41 +++++ frontend/src/hooks/auth.tsx | 96 ++---------- frontend/src/pages/Home.tsx | 148 +++++++++--------- frontend/src/pages/Login.tsx | 61 ++++++++ frontend/src/pages/Logout.tsx | 17 ++ frontend/src/pages/Register.tsx | 80 ++++++++++ store/app/crud/users.py | 4 +- 12 files changed, 324 insertions(+), 326 deletions(-) delete mode 100644 frontend/src/components/auth/AuthComponent.tsx delete mode 100644 frontend/src/components/auth/GoogleAuthComponent.tsx create mode 100644 frontend/src/pages/Login.tsx create mode 100644 frontend/src/pages/Logout.tsx create mode 100644 frontend/src/pages/Register.tsx diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index b8916ee7..6cf0555b 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -3,15 +3,18 @@ import Footer from "components/nav/Footer"; import TopNavbar from "components/nav/TopNavbar"; import NotFoundRedirect from "components/NotFoundRedirect"; import { AlertQueue, AlertQueueProvider } from "hooks/alerts"; -import { AuthenticationProvider, OneTimePasswordWrapper } from "hooks/auth"; +import { AuthenticationProvider } from "hooks/auth"; import { ThemeProvider } from "hooks/theme"; import About from "pages/About"; import EditRobotForm from "pages/EditRobotForm"; import Home from "pages/Home"; +import Login from "pages/Login"; +import Logout from "pages/Logout"; import NotFound from "pages/NotFound"; import PartDetails from "pages/PartDetails"; import PartForm from "pages/PartForm"; import Parts from "pages/Parts"; +import Register from "pages/Register"; import RobotDetails from "pages/RobotDetails"; import RobotForm from "pages/RobotForm"; import Robots from "pages/Robots"; @@ -28,29 +31,30 @@ const App = () => { - - + - - - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - - + + + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> + + -