MCPcopy
hub / github.com/gitify-app/gitify / RequireAuth

Function RequireAuth

src/renderer/App.tsx:29–39  ·  view source on GitHub ↗
({ children }: { children: React.ReactNode })

Source from the content-addressed store, hash-verified

27import { useAppContext } from './hooks/useAppContext';
28
29function RequireAuth({ children }: { children: React.ReactNode }) {
30 const location = useLocation();
31
32 const { isLoggedIn } = useAppContext();
33
34 return isLoggedIn ? (
35 children
36 ) : (
37 <Navigate replace state={{ from: location }} to="/login" />
38 );
39}
40
41export const App = () => {
42 return (

Callers

nothing calls this directly

Calls 1

useAppContextFunction · 0.90

Tested by

no test coverage detected