init + login
This commit is contained in:
14
src/pages/Layout.tsx
Normal file
14
src/pages/Layout.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { Outlet, Navigate } from 'react-router-dom'
|
||||
import { isLoggedIn, LoggedIn } from '../authorization'
|
||||
|
||||
export function Layout() {
|
||||
return (
|
||||
<div>
|
||||
<h1>Layout</h1>
|
||||
{
|
||||
isLoggedIn() === LoggedIn.No && <Navigate to="/login" replace={true} />
|
||||
}
|
||||
<Outlet />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user