Files
pawol.nu/pages/index.js
T
2022-05-08 23:51:37 +04:00

55 lines
1.6 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import PropTypes from 'prop-types'
import {Container, Typography, Box} from '@mui/material'
import HeadLayout from '../components/head-layout'
import Footer from '../components/footer'
import RezoDialog from '../components/rezo/rezo-dialog'
import DenyeTeks from '../components/teks/denye-teks'
import {jwennDenyeTeks} from '../lib/oki-api'
export default function Home({teks}) {
return (
<HeadLayout tab={0}>
<Box sx={{display: 'flex', flexDirection: 'column', minHeight: '100vh'}}>
<Box sx={{flexGrow: 1, marginBottom: 3}}>
<Container sx={{marginBottom: 3}} align='center'>
<Typography sx={{fontWeight: 'bold'}} variant='h6' component='h1'>
#OKi
</Typography>
<Typography sx={{fontWeight: 'bold'}} variant='h6' component='h2'>
Organisation KA Internationale
</Typography>
<Typography sx={{fontStyle: 'italic'}} variant='caption' component='h3'>
Paroles, traductions et actualités
</Typography>
</Container>
<Container align='center'>
<RezoDialog />
</Container>
</Box>
<Container align='center'>
<Typography sx={{fontWeight: 'bold'}} variant='h6' component='h2'>
Derniers textes publiés
</Typography>
</Container>
<DenyeTeks {...teks} />
<Footer />
</Box>
</HeadLayout>
)
}
export async function getServerSideProps() {
const denyeTeks = await jwennDenyeTeks()
return {
props: {
teks: denyeTeks
}
}
}
Home.propTypes = {
teks: PropTypes.array.isRequired
}