UPDATE: Added category page as well as reset password page

This commit is contained in:
Oscar
2025-02-05 14:55:05 +00:00
parent 0a92f00c69
commit 84faf0f33d
4 changed files with 28 additions and 1 deletions

View File

@@ -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() {
<Route path="/:streamerName" element={<StreamerRoute />} />
<Route path="/user/:username" element={<UserPage />} />
<Route path="/reset_password/:token" element={<ForgotPasswordPage />}></Route>
<Route path="/category/:category_name" element={<CategoryPage />}></Route>
<Route path="*" element={<NotFoundPage />} />
</Routes>

View File

@@ -0,0 +1,9 @@
import React from 'react'
const CategoryPage = () => {
return (
<div>CategoryPage</div>
)
}
export default CategoryPage

View File

@@ -0,0 +1,9 @@
import React from 'react'
const ForgotPasswordPage = () => {
return (
<div>ForgotPasswordPage</div>
)
}
export default ForgotPasswordPage

View File

@@ -17,6 +17,11 @@ const HomePage: React.FC<HomePageProps> = ({ variant = "default" }) => {
navigate(`/${streamerName}`);
};
const handleCategoryClick = (categoryID: number, categoryName: string) => {
console.log(`Navigating to category ${categoryID}`);
navigate(`category/${categoryName}`);
};
return (
<div
id="home-page"
@@ -54,7 +59,7 @@ const HomePage: React.FC<HomePageProps> = ({ variant = "default" }) => {
: "Categories that have been 'popping off' lately"
}
items={featuredCategories}
onClick={() => {}} //TODO
onClick={handleCategoryClick}
/>
</div>
);