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
+24 -26
View File
@@ -14,7 +14,6 @@ import Box from '@mui/material/Box'
import Grid from '@mui/material/Unstable_Grid2' import Grid from '@mui/material/Unstable_Grid2'
import ExplicitIcon from '@mui/icons-material/Explicit' import ExplicitIcon from '@mui/icons-material/Explicit'
import {styled} from '@mui/material/styles' import {styled} from '@mui/material/styles'
import {Peertube} from '@icons-pack/react-simple-icons'
import {getAlias} from '../../lib/utils/format' import {getAlias} from '../../lib/utils/format'
@@ -47,7 +46,7 @@ export default function TeksKat({parole}) {
const aliases = getAlias(artistes, attributes.prioriteArtistes) const aliases = getAlias(artistes, attributes.prioriteArtistes)
const handleClick = slug => { const handleClick = slug => {
router.push(`/paroles/${slug}#${slug}`).then(() => window.scrollTo(0, 0)) router.push(`/paroles/${slug}`)?.then(() => window.scrollTo(0, 0))
} }
return ( return (
@@ -66,34 +65,33 @@ export default function TeksKat({parole}) {
<Typography display='inline' style={{marginRight: 5}} variant='h6' component='h2'> <Typography display='inline' style={{marginRight: 5}} variant='h6' component='h2'>
{titre} {titre}
</Typography> </Typography>
{attributes.gadeEmbed && !attributes.okiMizikID && (
<Peertube style={{marginRight: 5}} fontSize='small' />
)}
{attributes.explicitLyrics && ( {attributes.explicitLyrics && (
<ExplicitIcon style={{marginRight: 5}} color='secondary' fontSize='small' /> <ExplicitIcon style={{marginRight: 5}} color='secondary' fontSize='small' />
)} )}
</Box> </Box>
<Typography variant='body2' color='textSecondary' component='p'> <Box sx={{textAlign: 'start'}}>
{aliases} <Typography variant='body2' color='textSecondary' component='p'>
</Typography> {aliases}
<Typography variant='body2' color='textSecondary' component='p'> </Typography>
{annee} <Typography variant='body2' color='textSecondary' component='p'>
</Typography> {annee}
<Typography sx={{fontStyle: 'italic'}} variant='caption'> </Typography>
{attributes.user && ( <Typography sx={{fontStyle: 'italic'}} variant='caption'>
<> {attributes.user && (
(<i>parole soumise par {attributes.user.username}</i>) <>
</> (<i>parole soumise par {attributes.user.username}</i>)
)} </>
{attributes.userAdmin && !attributes.user && ( )}
<> {attributes.userAdmin && !attributes.user && (
(<i>parole soumise par {attributes.userAdmin}</i>) <>
</> (<i>parole soumise par {attributes.userAdmin}</i>)
)} </>
</Typography> )}
<Typography align='center' style={{marginTop: '0.5em'}} variant='body1' color='textSecondary' component='p'> </Typography>
Publiée le : {datPiblikasyon} <Typography align='center' style={{marginTop: '0.5em'}} variant='body1' color='textSecondary' component='p'>
</Typography> Publiée le : {datPiblikasyon}
</Typography>
</Box>
</CardContent> </CardContent>
</CardActionArea> </CardActionArea>
</Card> </Card>