Change 'teks' route to 'paroles'
This commit is contained in:
@@ -55,7 +55,7 @@ export default function MizikBadjMeni({teks}) {
|
||||
}
|
||||
|
||||
const handleClick = slug => {
|
||||
router.push(`/teks/${slug}#${slug}`).then(() => window.scrollTo(0, 0))
|
||||
router.push(`/paroles/${slug}#${slug}`).then(() => window.scrollTo(0, 0))
|
||||
}
|
||||
|
||||
function handleListKeyDown(event) {
|
||||
|
||||
@@ -37,9 +37,9 @@ export default function MizikLis({meteEsMobilOuve, niAwtis, teks, slugTeksChwazi
|
||||
|
||||
if (slug !== slugTeksChwazi) {
|
||||
if (niAwtis) {
|
||||
router.push(`/teks/${slug}`).then(() => window.scrollTo(0, 0))
|
||||
router.push(`/paroles/${slug}`).then(() => window.scrollTo(0, 0))
|
||||
} else {
|
||||
router.push(`/teks/${slug}#${slug}`).then(() => window.scrollTo(0, 0))
|
||||
router.push(`/paroles/${slug}#${slug}`).then(() => window.scrollTo(0, 0))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ const Appdiv = styled('div')((
|
||||
|
||||
const tabRouteHref = [
|
||||
'/',
|
||||
'/teks',
|
||||
'/paroles',
|
||||
'/awtis?paj&paj=1',
|
||||
'/soumet',
|
||||
'/soutyen'
|
||||
@@ -38,7 +38,7 @@ const tabRouteHref = [
|
||||
|
||||
const tabRouteAs = [
|
||||
'/',
|
||||
'/teks',
|
||||
'/paroles',
|
||||
'/awtis/paj/1',
|
||||
'/soumet',
|
||||
'/soutyen'
|
||||
@@ -111,7 +111,7 @@ export default function Navigasyon({selectedTab}) {
|
||||
onChange={handleChange}
|
||||
>
|
||||
<Tab label='Accueil' {...a11yProps(0)} />
|
||||
<Tab label='Textes' {...a11yProps(1)} />
|
||||
<Tab label='Paroles' {...a11yProps(1)} />
|
||||
<Tab label='Artistes' {...a11yProps(2)} />
|
||||
<Tab label='Soumettre' {...a11yProps(3)} />
|
||||
<Tab label='Nous soutenir' {...a11yProps(4)} />
|
||||
|
||||
@@ -79,7 +79,7 @@ export default function DrawerBar({meteEsMobilOuve, teks, anTeks}) {
|
||||
<FormControl className={classes.form}>
|
||||
<InputBase
|
||||
className={classes.toolbar}
|
||||
placeholder='Chèché...'
|
||||
placeholder='Recherche...'
|
||||
startAdornment={
|
||||
<InputAdornment position='start'>
|
||||
<SearchIcon />
|
||||
|
||||
@@ -114,7 +114,7 @@ function EntegreMizik({anTeks, isMobile}) {
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (router.asPath === `/teks/${slug}` || router.asPath === `/teks/${slug}#${slug}`) {
|
||||
if (router.asPath === `/paroles/${slug}` || router.asPath === `/paroles/${slug}#${slug}`) {
|
||||
meteChwaMizik(null)
|
||||
}
|
||||
}, [router, slug])
|
||||
|
||||
@@ -47,7 +47,7 @@ export default function Pataje({teks, setError, setSuccess}) {
|
||||
const {tit, awtis, slug} = teks
|
||||
const [open, setOpen] = useState(false)
|
||||
|
||||
const patajeUrl = `${SITE_URL}/teks/${slug}#${slug}`
|
||||
const patajeUrl = `${SITE_URL}/paroles/${slug}#${slug}`
|
||||
const alias = awtis.map(({alias}) => alias)
|
||||
const renderAwtis = new Intl.ListFormat('fr').format(alias)
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ export default function TeksDrawer({teks, anTeks, komante}) {
|
||||
</IconButton>
|
||||
{anTeks ? (
|
||||
<>
|
||||
<Link passHref href='/teks'>
|
||||
<Link passHref href='/paroles'>
|
||||
<IconButton aria-label='return' size='medium'>
|
||||
<KeyboardBackspaceIcon style={{fontSize: '1.5em'}} />
|
||||
</IconButton>
|
||||
|
||||
@@ -38,7 +38,7 @@ export default function TeksKat({teks}) {
|
||||
const alias = awtis.map(({alias}) => alias)
|
||||
|
||||
const handleClick = slug => {
|
||||
router.push(`/teks/${slug}#${slug}`).then(() => window.scrollTo(0, 0))
|
||||
router.push(`/paroles/${slug}#${slug}`).then(() => window.scrollTo(0, 0))
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ export default function MyApp(props) {
|
||||
}, [router])
|
||||
|
||||
useEffect(() => {
|
||||
if (props.router.pathname.slice(0, 5) === '/teks') {
|
||||
if (props.router.pathname.slice(0, 8) === '/paroles') {
|
||||
setSwitchFixed(true)
|
||||
} else {
|
||||
setSwitchFixed(false)
|
||||
|
||||
@@ -39,7 +39,7 @@ export default function SlugTeks({teks, anTeks, slug, komante}) {
|
||||
imageWidth={formatKouveti() ? formatKouveti().width : null}
|
||||
imageHeight={formatKouveti() ? formatKouveti().height : null}
|
||||
imageMime={formatKouveti() ? formatKouveti().mime : null}
|
||||
title={`${awtis} - ${anTeks.tit} | Paroles et Traductions`} tab={1} slug={`teks/${slug}`}
|
||||
title={`${awtis} - ${anTeks.tit} | Paroles et Traductions`} tab={1} slug={`paroles/${slug}`}
|
||||
>
|
||||
<TeksDrawer teks={teks} anTeks={anTeks} komante={komante} />
|
||||
</HeadLayout>
|
||||
@@ -7,7 +7,7 @@ import HeadLayout from '../../components/head-layout'
|
||||
|
||||
export default function Teks({teks}) {
|
||||
return (
|
||||
<HeadLayout title='Tèks - Paroles et Traductions' tab={1} slug='teks'>
|
||||
<HeadLayout title='Paroles et Traductions' tab={1} slug='paroles'>
|
||||
<TeksDrawer teks={teks} />
|
||||
</HeadLayout>
|
||||
)
|
||||
@@ -10,11 +10,11 @@ const createSitemap = teks => (
|
||||
<priority>1</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>${url}/soutyen</loc>
|
||||
<loc>${url}/paroles</loc>
|
||||
<priority>0.9</priority>
|
||||
</url>
|
||||
<url>
|
||||
<loc>${url}/teks</loc>
|
||||
<loc>${url}/soutyen</loc>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
<url>
|
||||
@@ -28,7 +28,7 @@ const createSitemap = teks => (
|
||||
${teks
|
||||
.map(m => `
|
||||
<url>
|
||||
<loc>${`${url}/teks/${m}`}</loc>
|
||||
<loc>${`${url}/paroles/${m}`}</loc>
|
||||
</url>
|
||||
`)
|
||||
.join('')}
|
||||
|
||||
Reference in New Issue
Block a user