2024-06-20 14:06:07 +04:00
|
|
|
import {redirect} from 'next/navigation'
|
2024-09-15 18:04:54 +04:00
|
|
|
import Box from '@mui/material/Box'
|
|
|
|
|
import Container from '@mui/material/Container'
|
|
|
|
|
import Typography from '@mui/material/Typography'
|
2024-06-20 14:06:07 +04:00
|
|
|
import {auth} from '../../auth.js'
|
2024-09-15 18:04:54 +04:00
|
|
|
import GetVersions from '@/components/versions/get-versions.js'
|
|
|
|
|
import Footer from '@/components/footer.js'
|
2024-06-20 14:06:07 +04:00
|
|
|
|
|
|
|
|
export default async function DashboardPage() {
|
|
|
|
|
const session = await auth()
|
|
|
|
|
|
|
|
|
|
if (!session) {
|
|
|
|
|
redirect('/login')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
2024-09-15 18:04:54 +04:00
|
|
|
<Box sx={{
|
|
|
|
|
display: 'flex',
|
|
|
|
|
flexDirection: 'column',
|
|
|
|
|
minHeight: '100vh',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<Container>
|
|
|
|
|
<Typography
|
|
|
|
|
textTransform='uppercase'
|
|
|
|
|
mt={1}
|
|
|
|
|
component='h1'
|
|
|
|
|
textAlign='center'
|
|
|
|
|
variant='h4'
|
|
|
|
|
>
|
|
|
|
|
Tableau de bord
|
|
|
|
|
</Typography>
|
|
|
|
|
<GetVersions session={session} />
|
|
|
|
|
</Container>
|
|
|
|
|
<Footer />
|
|
|
|
|
</Box>
|
2024-06-20 14:06:07 +04:00
|
|
|
)
|
|
|
|
|
}
|