Improve Sign component
This commit is contained in:
+9
-1
@@ -2,6 +2,7 @@ import {createDirectus, rest, readItems} from '@directus/sdk'
|
||||
import Container from '@mui/material/Container'
|
||||
import Box from '@mui/material/Box'
|
||||
import Typography from '@mui/material/Typography'
|
||||
import AdminPanelSettingsIcon from '@mui/icons-material/AdminPanelSettings'
|
||||
import {auth} from '../auth.js'
|
||||
import Konstitisyon from '@/components/konstitisyon/index.js'
|
||||
import Footer from '@/components/footer.js'
|
||||
@@ -11,6 +12,13 @@ import Create from '@/components/konstitisyon/create/index.js'
|
||||
const apiUrl = process.env.DIRECTUS_API_URL
|
||||
const appTitle = process.env.APP_TITLE
|
||||
|
||||
const navButton = {
|
||||
title: 'Tableau de bord',
|
||||
path: '/dashboard',
|
||||
color: 'success',
|
||||
icon: <AdminPanelSettingsIcon fontSize='large' />
|
||||
}
|
||||
|
||||
async function getData() {
|
||||
if (!apiUrl) {
|
||||
throw new Error('DIRECTUS_API_URL is required')
|
||||
@@ -67,7 +75,7 @@ export default async function Page() {
|
||||
>
|
||||
<Container maxWidth='sm'>
|
||||
<Typography mt={1} component='h1' textAlign='center' variant='h4'>{appTitle.toUpperCase()}</Typography>
|
||||
<Sign session={session} />
|
||||
<Sign session={session} navButton={navButton} />
|
||||
{session && (
|
||||
<Create session={session} titres={titres} />
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user