From cb27abcba87ab9645c24e9069af43dd544f44788 Mon Sep 17 00:00:00 2001 From: ZacTohZY Date: Fri, 28 Jun 2024 13:17:04 +0800 Subject: [PATCH] Added schedule page --- client/src/App.tsx | 2 + client/src/components/SpringboardButton.tsx | 6 +- client/src/pages/SchedulePage.tsx | 109 ++++++++++++++++++++ client/src/pages/SpringboardPage.tsx | 10 +- server/models/Schedule.js | 24 +++++ 5 files changed, 149 insertions(+), 2 deletions(-) create mode 100644 client/src/pages/SchedulePage.tsx create mode 100644 server/models/Schedule.js diff --git a/client/src/App.tsx b/client/src/App.tsx index d897151..6d0c2ab 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -4,6 +4,7 @@ import SignUpPage from "./pages/SignUpPage"; import SignInPage from "./pages/SignInPage"; import SpringboardPage from "./pages/SpringboardPage"; import ManageUserAccountPage from "./pages/ManageUserAccountPage"; +import SchedulePage from "./pages/SchedulePage"; function App() { return ( @@ -16,6 +17,7 @@ function App() { element={} path="/manage-account/:accessToken" /> + } path="/schedule"/> ); } diff --git a/client/src/components/SpringboardButton.tsx b/client/src/components/SpringboardButton.tsx index 5ae8bd8..a97b1fb 100644 --- a/client/src/components/SpringboardButton.tsx +++ b/client/src/components/SpringboardButton.tsx @@ -1,14 +1,18 @@ import { Button } from "@nextui-org/react"; +import { useNavigate } from "react-router-dom"; export default function SpringboardButton({ title, subtitle, + linkToPage, }: { title: string; subtitle: string; + linkToPage: string; }) { + const navigate = useNavigate(); return ( -