@devries-cameron20 / OCIU-npo Mirror · read-only / commits / f1c8e39
Fork 0

Mirrored from https://github.com/Camo67/OCIU-npo.git

Synced Nov 21, 03:37 UTC

Redirect sample pages to home

Cameron “Camo” De Vries committed Oct 29, 2026 at 22:16 UTC f1c8e39fb09ced186c06ba5ade4455b025d5d661
1 file changed +5 -9
src/App.tsx
+5 -9
@@ -2,12 +2,8 @@ import { Toaster } from "@/components/ui/toaster";
2 import { Toaster as Sonner } from "@/components/ui/sonner";
3 import { TooltipProvider } from "@/components/ui/tooltip";
4 import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
5 -import { BrowserRouter, Routes, Route } from "react-router-dom";
5 +import { BrowserRouter, Routes, Route, Navigate } from "react-router-dom";
6 import Index from "./pages/Index";
7 -import CommunityNews from "./pages/CommunityNews";
8 -import JobSeeker from "./pages/JobSeeker";
9 -import AITutor from "./pages/AITutor";
10 -import CommunityClassroom from "./pages/CommunityClassroom";
7 import NotFound from "./pages/NotFound";
8
9 const queryClient = new QueryClient();
@@ -20,10 +16,10 @@ const App = () => (
16 <BrowserRouter>
17 <Routes>
18 <Route path="/" element={<Index />} />
23 - <Route path="/community-news" element={<CommunityNews />} />
24 - <Route path="/job-seeker" element={<JobSeeker />} />
25 - <Route path="/ai-tutor" element={<AITutor />} />
26 - <Route path="/community-classroom" element={<CommunityClassroom />} />
19 + <Route path="/community-news" element={<Navigate to="/" replace />} />
20 + <Route path="/job-seeker" element={<Navigate to="/" replace />} />
21 + <Route path="/ai-tutor" element={<Navigate to="/" replace />} />
22 + <Route path="/community-classroom" element={<Navigate to="/" replace />} />
23 {/* ADD ALL CUSTOM ROUTES ABOVE THE CATCH-ALL "*" ROUTE */}
24 <Route path="*" element={<NotFound />} />
25 </Routes>