perf: streamer la liste des morceaux sans bloquer le rendu de la page
Déploiement FRONT BETA / check (push) Successful in 2m2s
Déploiement FRONT PROD / check (push) Successful in 2m5s
Déploiement FRONT BETA / deploy (push) Successful in 22s
Déploiement FRONT PROD / deploy (push) Successful in 19s

This commit is contained in:
2026-07-04 00:03:22 +04:00
parent 15367f388e
commit 9f9b408f1f
2 changed files with 16 additions and 17 deletions
+3 -17
View File
@@ -1,7 +1,5 @@
import {Suspense} from 'react'
import {notFound} from 'next/navigation'
import {jwennTeks} from '../../lib/oki-api'
import TeksDrawer from '../../components/teks/teks-drawer'
import TeksDrawerLoader from '../../components/teks/teks-drawer-loader'
import {CurrentTrackProvider} from '../../components/teks/current-track-context'
import Loading from './loading'
@@ -40,23 +38,11 @@ export const metadata = {
}
}
async function jwennDotDone() {
const teks = await jwennTeks()
if (!teks) {
notFound()
}
return teks
}
export default async function PawolLayout({children}) {
const teks = await jwennDotDone()
export default function PawolLayout({children}) {
return (
<CurrentTrackProvider>
<Suspense fallback={<Loading />}>
<TeksDrawer paroles={teks} />
<TeksDrawerLoader />
</Suspense>
<section>
{children}
+13
View File
@@ -0,0 +1,13 @@
import {notFound} from 'next/navigation'
import {jwennTeks} from '../../lib/oki-api'
import TeksDrawer from './teks-drawer'
export default async function TeksDrawerLoader() {
const teks = await jwennTeks()
if (!teks) {
notFound()
}
return <TeksDrawer paroles={teks} />
}