Files
pawol.nu/app/page.js
T
cedric 64cdd784c3
Déploiement FRONT PROD / check (push) Failing after 2m6s
Déploiement FRONT PROD / deploy (push) Has been skipped
Déploiement FRONT BETA / check (push) Failing after 2m11s
Déploiement FRONT BETA / deploy (push) Has been skipped
fix: rétablir force-dynamic sur la page d'accueil
Sa suppression (44e1a42) faisait basculer la page d'accueil en
génération statique au build : le moindre souci de récupération de
données à ce moment-là fait planter tout le build ("Export
encountered an error on /page: /"), et le script de déploiement
redémarre quand même pm2 sur un .next incomplet (502 en prod).
2026-07-04 23:12:52 +04:00

40 lines
1.1 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 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 />
<Container sx={{flexGrow: 100}}>
{dernierTeks && <AnVedette teks={dernierTeks} />}
<Statistik statistik={statistik} />
<Aso />
</Container>
<Footer />
</Box>
)
}