From 84faf0f33dd0ebef56353800735b1819a7b0f2b3 Mon Sep 17 00:00:00 2001 From: Oscar <122336651@umail.ucc.ie> Date: Wed, 5 Feb 2025 14:55:05 +0000 Subject: [PATCH] UPDATE: Added category page as well as reset password page --- frontend/src/App.tsx | 4 ++++ frontend/src/pages/CategoryPage.tsx | 9 +++++++++ frontend/src/pages/ForgotPasswordPage.tsx | 9 +++++++++ frontend/src/pages/HomePage.tsx | 7 ++++++- 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 frontend/src/pages/CategoryPage.tsx create mode 100644 frontend/src/pages/ForgotPasswordPage.tsx diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 3d498ee..9b5ce82 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -6,6 +6,8 @@ import HomePage from "./pages/HomePage"; import StreamerRoute from "./components/Stream/StreamerRoute"; import NotFoundPage from "./pages/NotFoundPage"; import UserPage from "./pages/UserPage"; +import ForgotPasswordPage from "./pages/ForgotPasswordPage"; +import CategoryPage from "./pages/CategoryPage"; function App() { const [isLoggedIn, setIsLoggedIn] = useState(false); @@ -40,6 +42,8 @@ function App() { } /> } /> + }> + }> } /> diff --git a/frontend/src/pages/CategoryPage.tsx b/frontend/src/pages/CategoryPage.tsx new file mode 100644 index 0000000..00493cf --- /dev/null +++ b/frontend/src/pages/CategoryPage.tsx @@ -0,0 +1,9 @@ +import React from 'react' + +const CategoryPage = () => { + return ( +
CategoryPage
+ ) +} + +export default CategoryPage \ No newline at end of file diff --git a/frontend/src/pages/ForgotPasswordPage.tsx b/frontend/src/pages/ForgotPasswordPage.tsx new file mode 100644 index 0000000..42474d5 --- /dev/null +++ b/frontend/src/pages/ForgotPasswordPage.tsx @@ -0,0 +1,9 @@ +import React from 'react' + +const ForgotPasswordPage = () => { + return ( +
ForgotPasswordPage
+ ) +} + +export default ForgotPasswordPage \ No newline at end of file diff --git a/frontend/src/pages/HomePage.tsx b/frontend/src/pages/HomePage.tsx index 7517be4..c2b6dfc 100644 --- a/frontend/src/pages/HomePage.tsx +++ b/frontend/src/pages/HomePage.tsx @@ -17,6 +17,11 @@ const HomePage: React.FC = ({ variant = "default" }) => { navigate(`/${streamerName}`); }; + const handleCategoryClick = (categoryID: number, categoryName: string) => { + console.log(`Navigating to category ${categoryID}`); + navigate(`category/${categoryName}`); + }; + return (
= ({ variant = "default" }) => { : "Categories that have been 'popping off' lately" } items={featuredCategories} - onClick={() => {}} //TODO + onClick={handleCategoryClick} />
);