throwing away bunch of garbage
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import React from 'react';
|
||||
import useAuth from '../../providers/AuthProvider';
|
||||
import Login from './login/Login';
|
||||
|
||||
export default function ProtectedRoute({ children }: { children: React.ReactNode }) {
|
||||
const { user } = useAuth();
|
||||
|
||||
if (!user) return <Login />;
|
||||
|
||||
return <>{children}</>;
|
||||
}
|
||||
Reference in New Issue
Block a user