Files
twenty/front/src/components/RequireAuth.tsx
2023-02-02 20:40:44 +01:00

10 lines
226 B
TypeScript

import { redirectIfNotLoggedIn } from '../hooks/AuthenticationHooks';
function RequireAuth({ children }: { children: JSX.Element }): JSX.Element {
redirectIfNotLoggedIn();
return children;
}
export default RequireAuth;