Updated UI with accounts and fixed routing
This commit is contained in:
18
ui/src/components/Administration.tsx
Normal file
18
ui/src/components/Administration.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Header } from '@components/Header';
|
||||
import { Navigate } from 'react-router';
|
||||
import { useUserContext } from '@components/context/UserContext.tsx';
|
||||
|
||||
export function Administration() {
|
||||
const { user } = useUserContext();
|
||||
|
||||
if (user == undefined) {
|
||||
return <Navigate to={'/'} />;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<Header />
|
||||
Todo: administration {user?.email}
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user