fix: icônes partage/streaming via contexte au lieu du layout

This commit is contained in:
2026-07-03 22:22:11 +04:00
parent 96b7a601c8
commit e4d31b0243
4 changed files with 40 additions and 9 deletions
+6 -7
View File
@@ -1,7 +1,8 @@
import {Suspense} from 'react'
import {notFound} from 'next/navigation'
import {jwennTeks, jwennTeksEpiSlug} from '../../lib/oki-api'
import {jwennTeks} from '../../lib/oki-api'
import TeksDrawer from '../../components/teks/teks-drawer'
import {CurrentTrackProvider} from '../../components/teks/current-track-context'
import Loading from './loading'
const siteName = process.env.NEXT_PUBLIC_SITE_NAME || 'PAWÒL-NU. Paroles et traductions.'
@@ -49,19 +50,17 @@ async function jwennDotDone() {
return teks
}
export default async function PawolLayout({children, params}) {
const {slug} = await params
export default async function PawolLayout({children}) {
const teks = await jwennDotDone()
const parole = slug ? await jwennTeksEpiSlug(slug) : null
return (
<>
<CurrentTrackProvider>
<Suspense fallback={<Loading />}>
<TeksDrawer paroles={teks} parole={parole} />
<TeksDrawer paroles={teks} />
</Suspense>
<section>
{children}
</section>
</>
</CurrentTrackProvider>
)
}