UPDATE: Added category page as well as reset password page
This commit is contained in:
@@ -6,6 +6,8 @@ import HomePage from "./pages/HomePage";
|
|||||||
import StreamerRoute from "./components/Stream/StreamerRoute";
|
import StreamerRoute from "./components/Stream/StreamerRoute";
|
||||||
import NotFoundPage from "./pages/NotFoundPage";
|
import NotFoundPage from "./pages/NotFoundPage";
|
||||||
import UserPage from "./pages/UserPage";
|
import UserPage from "./pages/UserPage";
|
||||||
|
import ForgotPasswordPage from "./pages/ForgotPasswordPage";
|
||||||
|
import CategoryPage from "./pages/CategoryPage";
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
const [isLoggedIn, setIsLoggedIn] = useState(false);
|
const [isLoggedIn, setIsLoggedIn] = useState(false);
|
||||||
@@ -40,6 +42,8 @@ function App() {
|
|||||||
|
|
||||||
<Route path="/:streamerName" element={<StreamerRoute />} />
|
<Route path="/:streamerName" element={<StreamerRoute />} />
|
||||||
<Route path="/user/:username" element={<UserPage />} />
|
<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 />} />
|
<Route path="*" element={<NotFoundPage />} />
|
||||||
</Routes>
|
</Routes>
|
||||||
|
|||||||
9
frontend/src/pages/CategoryPage.tsx
Normal file
9
frontend/src/pages/CategoryPage.tsx
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import React from 'react'
|
||||||
|
|
||||||
|
const CategoryPage = () => {
|
||||||
|
return (
|
||||||
|
<div>CategoryPage</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default CategoryPage
|
||||||
9
frontend/src/pages/ForgotPasswordPage.tsx
Normal file
9
frontend/src/pages/ForgotPasswordPage.tsx
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import React from 'react'
|
||||||
|
|
||||||
|
const ForgotPasswordPage = () => {
|
||||||
|
return (
|
||||||
|
<div>ForgotPasswordPage</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ForgotPasswordPage
|
||||||
@@ -17,6 +17,11 @@ const HomePage: React.FC<HomePageProps> = ({ variant = "default" }) => {
|
|||||||
navigate(`/${streamerName}`);
|
navigate(`/${streamerName}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleCategoryClick = (categoryID: number, categoryName: string) => {
|
||||||
|
console.log(`Navigating to category ${categoryID}`);
|
||||||
|
navigate(`category/${categoryName}`);
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
id="home-page"
|
id="home-page"
|
||||||
@@ -54,7 +59,7 @@ const HomePage: React.FC<HomePageProps> = ({ variant = "default" }) => {
|
|||||||
: "Categories that have been 'popping off' lately"
|
: "Categories that have been 'popping off' lately"
|
||||||
}
|
}
|
||||||
items={featuredCategories}
|
items={featuredCategories}
|
||||||
onClick={() => {}} //TODO
|
onClick={handleCategoryClick}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user