Add Sign to index page
This commit is contained in:
@@ -1,9 +1,11 @@
|
|||||||
|
import {getServerSession} from 'next-auth'
|
||||||
import {createDirectus, rest, readItems} from '@directus/sdk'
|
import {createDirectus, rest, readItems} from '@directus/sdk'
|
||||||
import Container from '@mui/material/Container'
|
import Container from '@mui/material/Container'
|
||||||
import Box from '@mui/material/Box'
|
import Box from '@mui/material/Box'
|
||||||
import Typography from '@mui/material/Typography'
|
import Typography from '@mui/material/Typography'
|
||||||
import Konstitisyon from '@/components/konstitisyon/index.js'
|
import Konstitisyon from '@/components/konstitisyon/index.js'
|
||||||
import Footer from '@/components/footer.js'
|
import Footer from '@/components/footer.js'
|
||||||
|
import Sign from '@/components/session/sign.js'
|
||||||
|
|
||||||
const apiUrl = process.env.DIRECTUS_API_URL
|
const apiUrl = process.env.DIRECTUS_API_URL
|
||||||
const appTitle = process.env.APP_TITLE
|
const appTitle = process.env.APP_TITLE
|
||||||
@@ -42,6 +44,7 @@ async function getData() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default async function Page() {
|
export default async function Page() {
|
||||||
|
const session = await getServerSession()
|
||||||
const {titres, articles} = await getData()
|
const {titres, articles} = await getData()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -53,6 +56,7 @@ export default async function Page() {
|
|||||||
>
|
>
|
||||||
<Container maxWidth='sm'>
|
<Container maxWidth='sm'>
|
||||||
<Typography mt={1} component='h1' textAlign='center' variant='h4'>{appTitle.toUpperCase()}</Typography>
|
<Typography mt={1} component='h1' textAlign='center' variant='h4'>{appTitle.toUpperCase()}</Typography>
|
||||||
|
<Sign session={session} />
|
||||||
<Konstitisyon titres={titres} articles={articles} />
|
<Konstitisyon titres={titres} articles={articles} />
|
||||||
</Container>
|
</Container>
|
||||||
<Footer />
|
<Footer />
|
||||||
|
|||||||
Reference in New Issue
Block a user