MCPcopy Create free account
hub / github.com/BingyanStudio/github-analyzer / ProtectedRoute

Function ProtectedRoute

web/src/App.tsx:26–36  ·  view source on GitHub ↗
({ children }: { children: React.ReactNode })

Source from the content-addressed store, hash-verified

24
25 // Protected route component
26 const ProtectedRoute = ({ children }: { children: React.ReactNode }) => {
27 if (isLoading) {
28 return <div>Loading...</div>;
29 }
30
31 if (!isAuthenticated) {
32 return <Navigate to="/login" replace />;
33 }
34
35 return <>{children}</>;
36 };
37
38 return (
39 <ThemeProvider defaultTheme="dark" storageKey="vite-ui-theme">

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected