Remove Peertube icon and fix handleClick in Teks component

This commit is contained in:
2023-07-22 13:54:58 +04:00
parent 266dcfd9ea
commit c9ac7c55ca
+3 -5
View File
@@ -14,7 +14,6 @@ import Box from '@mui/material/Box'
import Grid from '@mui/material/Unstable_Grid2'
import ExplicitIcon from '@mui/icons-material/Explicit'
import {styled} from '@mui/material/styles'
import {Peertube} from '@icons-pack/react-simple-icons'
import {getAlias} from '../../lib/utils/format'
@@ -47,7 +46,7 @@ export default function TeksKat({parole}) {
const aliases = getAlias(artistes, attributes.prioriteArtistes)
const handleClick = slug => {
router.push(`/paroles/${slug}#${slug}`).then(() => window.scrollTo(0, 0))
router.push(`/paroles/${slug}`)?.then(() => window.scrollTo(0, 0))
}
return (
@@ -66,13 +65,11 @@ export default function TeksKat({parole}) {
<Typography display='inline' style={{marginRight: 5}} variant='h6' component='h2'>
{titre}
</Typography>
{attributes.gadeEmbed && !attributes.okiMizikID && (
<Peertube style={{marginRight: 5}} fontSize='small' />
)}
{attributes.explicitLyrics && (
<ExplicitIcon style={{marginRight: 5}} color='secondary' fontSize='small' />
)}
</Box>
<Box sx={{textAlign: 'start'}}>
<Typography variant='body2' color='textSecondary' component='p'>
{aliases}
</Typography>
@@ -94,6 +91,7 @@ export default function TeksKat({parole}) {
<Typography align='center' style={{marginTop: '0.5em'}} variant='body1' color='textSecondary' component='p'>
Publiée le : {datPiblikasyon}
</Typography>
</Box>
</CardContent>
</CardActionArea>
</Card>