From abca372d8ef3d9ab0154c3706d88e0c3772bacc3 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Tue, 23 Sep 2025 14:48:00 -0700 Subject: add community scores API and frontend views --- frontend/src/App.tsx | 2 + frontend/src/components/NavBar.tsx | 88 ++++------ frontend/src/pages/AllScores.tsx | 341 +++++++++++++++++++++++++++++++++++++ 3 files changed, 378 insertions(+), 53 deletions(-) create mode 100644 frontend/src/pages/AllScores.tsx (limited to 'frontend') diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 9b0e058..934eecd 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -8,6 +8,7 @@ import Home from "./pages/Home"; import Score from "./pages/Score"; import Chart from "./pages/Chart"; import Admin from "./pages/Admin"; +import AllScores from "./pages/AllScores"; function App() { return ( @@ -21,6 +22,7 @@ function App() { } /> } /> } /> + } /> ); diff --git a/frontend/src/components/NavBar.tsx b/frontend/src/components/NavBar.tsx index 7e111d0..4be8607 100644 --- a/frontend/src/components/NavBar.tsx +++ b/frontend/src/components/NavBar.tsx @@ -5,58 +5,40 @@ export const NavBar = ({ currentPage, user, handleLogout }: { user: { username: string }; handleLogout: () => void; }) => { - const getMenuOptions = () => { - switch (currentPage) { - case 'dashboard': - return ( - <> - - Import Data - - - ); - case 'import': - return ( - <> - - Home - - - ); - case 'score': - return ( - <> - - Home - - - Import Data - - - ); - default: - return ( - - Import Data - - ); - } - }; + const menuOptions = ( + <> + + Home + + + Import Data + + + Community Scores + + + ); return (