Add slug to HeadLayout
This commit is contained in:
+1
-1
@@ -11,7 +11,7 @@ const AWTIS_POU_CHAK_PAJ = process.env.NEXT_PUBLIC_AWTIS_POU_CHAK_PAJ || 6
|
||||
|
||||
export default function Awtis({pajTotal, awtisPouChakPaj, paj}) {
|
||||
return (
|
||||
<HeadLayout title='Awtis' tab={1}>
|
||||
<HeadLayout title='Awtis' tab={1} slug='awtis'>
|
||||
<Pajinasyon pajTotal={pajTotal} paj={paj} />
|
||||
<Container>
|
||||
<Grid container spacing={4}>
|
||||
|
||||
@@ -5,9 +5,9 @@ import {jwennTeksEpiSlug, jwennTeks} from '../../lib/oki-api'
|
||||
import TeksDrawer from '../../components/teks/teks-drawer'
|
||||
import HeadLayout from '../../components/head-layout'
|
||||
|
||||
export default function SlugTeks({teks, anTeks}) {
|
||||
export default function SlugTeks({teks, anTeks, slug}) {
|
||||
return (
|
||||
<HeadLayout title={`Tèks | ${anTeks.tit}`} tab={2}>
|
||||
<HeadLayout title={`Tèks | ${anTeks.tit}`} tab={2} slug={`teks/${slug}`}>
|
||||
<TeksDrawer teks={teks} anTeks={anTeks} />
|
||||
</HeadLayout>
|
||||
)
|
||||
@@ -25,12 +25,14 @@ export async function getServerSideProps({query}) {
|
||||
return {
|
||||
props: {
|
||||
teks,
|
||||
anTeks
|
||||
anTeks,
|
||||
slug
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SlugTeks.propTypes = {
|
||||
teks: PropTypes.array.isRequired,
|
||||
anTeks: PropTypes.object.isRequired
|
||||
anTeks: PropTypes.object.isRequired,
|
||||
slug: PropTypes.string.isRequired
|
||||
}
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import HeadLayout from '../../components/head-layout'
|
||||
|
||||
export default function Teks({teks}) {
|
||||
return (
|
||||
<HeadLayout title='Tèks' tab={2}>
|
||||
<HeadLayout title='Tèks' tab={2} slug='teks'>
|
||||
<TeksDrawer teks={teks} />
|
||||
</HeadLayout>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user