Files
pawol.nu/app/page.js
T
cedric f28fa96f89
Déploiement FRONT PROD / check (push) Successful in 2m14s
Déploiement FRONT PROD / deploy (push) Successful in 21s
fix: declare page dynamic
2026-06-17 09:20:11 +04:00

41 lines
1.2 KiB
JavaScript

export const dynamic = 'force-dynamic'
import Box from '@mui/material/Box'
import Container from '@mui/material/Container'
import {notFound} from 'next/navigation'
import {jwennStats, jwennDenyeTeks, jwennAnVedette} from '../lib/oki-api'
import Statistik from '../components/akey/statistik'
import Akey from '../components/akey'
import AnVedette from '../components/akey/an-vedette'
import okiLogo from '../public/logo-512x512.png'
import Footer from '../components/footer'
import Aso from '../components/akey/aso'
async function jwennDone() {
const [statistik, denyeTeks, anVedette] = await Promise.all([jwennStats(), jwennDenyeTeks(), jwennAnVedette()])
if (!statistik) {
notFound()
}
return {statistik, dernierTeks: anVedette ?? denyeTeks?.[0]}
}
export default async function Page() {
const {statistik, dernierTeks} = await jwennDone()
return (
<Box sx={{display: 'flex', flexDirection: 'column', minHeight: '100vh'}}>
<Akey logo={okiLogo} />
<Container sx={{flexGrow: 100}}>
{dernierTeks && <AnVedette teks={dernierTeks} />}
<Statistik statistik={statistik} />
<Aso />
</Container>
<Footer />
</Box>
)
}