47 lines
1.2 KiB
TypeScript
47 lines
1.2 KiB
TypeScript
'use client';
|
|
|
|
import React from 'react';
|
|
import {Box, Button, CircularProgress, Paper, Typography} from '@mui/material';
|
|
import {useAuth} from "@/src/auth/AuthProvider";
|
|
import {AuthGuard} from "@/src/auth/AuthGuard";
|
|
|
|
const HomePage: React.FC = () => {
|
|
const {logout} = useAuth()
|
|
|
|
const handleLogoutClick = async () => {
|
|
await logout()
|
|
}
|
|
|
|
return (
|
|
<AuthGuard>
|
|
<Box
|
|
sx={{
|
|
minHeight: '100vh',
|
|
backgroundColor: {
|
|
xs: 'white',
|
|
md: 'grey.100',
|
|
},
|
|
p: {xs: 0, sm: 4},
|
|
}}
|
|
>
|
|
|
|
<Paper
|
|
elevation={0}
|
|
sx={{
|
|
maxWidth: 720,
|
|
mx: 'auto',
|
|
p: {xs: 3, sm: 4},
|
|
borderRadius: 4,
|
|
boxShadow: {
|
|
xs: 'none',
|
|
md: 4,
|
|
}
|
|
}}
|
|
>
|
|
</Paper>
|
|
</Box>
|
|
</AuthGuard>
|
|
);
|
|
};
|
|
|
|
export default HomePage;
|