Implement view public page functionality

This commit is contained in:
Tola Leng
2025-06-06 18:49:54 +08:00
parent 8608b6a263
commit 1264d293bf
+12
View File
@@ -17,6 +17,8 @@ import Profile from "./pages/Profile";
import NotFound from "./pages/NotFound"; import NotFound from "./pages/NotFound";
import SslDomain from "./pages/SslDomain"; import SslDomain from "./pages/SslDomain";
import ScheduleIncident from "./pages/ScheduleIncident"; import ScheduleIncident from "./pages/ScheduleIncident";
import OperationalPage from "./pages/OperationalPage";
import PublicStatusPage from "./pages/PublicStatusPage";
// Create a Protected route component // Create a Protected route component
const ProtectedRoute = ({ children }: { children: React.ReactNode }) => { const ProtectedRoute = ({ children }: { children: React.ReactNode }) => {
@@ -111,6 +113,16 @@ const App = () => {
</ProtectedRoute> </ProtectedRoute>
} }
/> />
<Route
path="/operational-page"
element={
<ProtectedRoute>
<OperationalPage />
</ProtectedRoute>
}
/>
{/* Public status page route */}
<Route path="/status/:slug" element={<PublicStatusPage />} />
{/* ADD ALL CUSTOM ROUTES ABOVE THE CATCH-ALL "*" ROUTE */} {/* ADD ALL CUSTOM ROUTES ABOVE THE CATCH-ALL "*" ROUTE */}
<Route path="*" element={<NotFound />} /> <Route path="*" element={<NotFound />} />
</Routes> </Routes>