From 37066c9e1b70b4957aa8bb30bd62850d09ce3bb1 Mon Sep 17 00:00:00 2001 From: ozerodb <50593663+ozerodb@users.noreply.github.com> Date: Wed, 3 Jan 2024 13:35:45 +0100 Subject: [PATCH] refactored frontend following best practices --- frontend/index.html | 104 ++++++----------- frontend/public/hkn_logo_white_vector.svg | 74 ++++++++++++ frontend/public/notfound404.jpg | Bin 0 -> 37104 bytes frontend/src/App.css | 85 ++------------ frontend/src/App.css.old | 82 ++++++++++++++ frontend/src/App.jsx | 105 ++++++++---------- frontend/src/Auth0ProviderWithNavigate.jsx | 32 ++++++ frontend/src/LoginButton.tsx | 22 ---- frontend/src/MyNavbar.jsx | 47 -------- .../ApplyForm.jsx.old} | 0 frontend/src/components/AuthGuard.jsx | 17 +++ .../AvailabilitiesCell.jsx} | 0 .../AvailabilitiesTable.jsx} | 18 +-- frontend/src/components/HKNavbar.jsx | 74 ++++++++++++ frontend/src/components/HomeButton.jsx | 15 +++ frontend/src/components/LoadingSpinner.jsx | 11 ++ frontend/src/components/LoginButton.jsx | 23 ++++ frontend/src/components/LogoutButton.jsx | 19 ++++ frontend/src/components/PageHeader.jsx | 14 +++ frontend/src/components/PageLayout.jsx | 17 +++ frontend/src/index.css | 4 - frontend/src/index.jsx | 17 +++ frontend/src/logo.svg | 1 - frontend/src/main.jsx | 21 ---- frontend/src/pages/ApplyPage.jsx | 13 +++ frontend/src/pages/AvailabilitiesPage.jsx | 32 ++++++ frontend/src/pages/DebugPage.jsx | 41 +++++++ frontend/src/pages/HomePage.jsx | 36 ++++++ frontend/src/pages/NotFoundPage.jsx | 14 +++ .../src/{ApiRequests.tsx => services/API.ts} | 0 30 files changed, 629 insertions(+), 309 deletions(-) create mode 100644 frontend/public/hkn_logo_white_vector.svg create mode 100644 frontend/public/notfound404.jpg create mode 100644 frontend/src/App.css.old create mode 100644 frontend/src/Auth0ProviderWithNavigate.jsx delete mode 100644 frontend/src/LoginButton.tsx delete mode 100644 frontend/src/MyNavbar.jsx rename frontend/src/{SignupForm.jsx => components/ApplyForm.jsx.old} (100%) create mode 100644 frontend/src/components/AuthGuard.jsx rename frontend/src/{AvaiabilitiesCell.jsx => components/AvailabilitiesCell.jsx} (100%) rename frontend/src/{AvaiabilitiesTable.tsx => components/AvailabilitiesTable.jsx} (94%) create mode 100644 frontend/src/components/HKNavbar.jsx create mode 100644 frontend/src/components/HomeButton.jsx create mode 100644 frontend/src/components/LoadingSpinner.jsx create mode 100644 frontend/src/components/LoginButton.jsx create mode 100644 frontend/src/components/LogoutButton.jsx create mode 100644 frontend/src/components/PageHeader.jsx create mode 100644 frontend/src/components/PageLayout.jsx create mode 100644 frontend/src/index.jsx delete mode 100644 frontend/src/logo.svg delete mode 100644 frontend/src/main.jsx create mode 100644 frontend/src/pages/ApplyPage.jsx create mode 100644 frontend/src/pages/AvailabilitiesPage.jsx create mode 100644 frontend/src/pages/DebugPage.jsx create mode 100644 frontend/src/pages/HomePage.jsx create mode 100644 frontend/src/pages/NotFoundPage.jsx rename frontend/src/{ApiRequests.tsx => services/API.ts} (100%) diff --git a/frontend/index.html b/frontend/index.html index 191149a..e8f3372 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -1,71 +1,39 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - -