Change awtis to artiste
This commit is contained in:
@@ -23,6 +23,7 @@ import AwtisBiyografi from './awtis-biyografi'
|
||||
|
||||
const PREFIX = 'awtis-kat'
|
||||
const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL || 'http://localhost:3001'
|
||||
const IMAGE_URL = process.env.NEXT_PUBLIC_API_URL_ROOT || 'http://localhost:1337'
|
||||
|
||||
const classes = {
|
||||
root: `${PREFIX}-root`,
|
||||
@@ -54,12 +55,13 @@ const Kat = styled('div')((
|
||||
}
|
||||
}))
|
||||
|
||||
export default function AwtisKat({anAwtis}) {
|
||||
const noImageUrl = 'https://place-hold.it/140x140?text=Indisponible'
|
||||
|
||||
export default function AwtisKat({artiste}) {
|
||||
const router = useRouter()
|
||||
const [esByografiOuve, meteEsByografiOuve] = useState(false)
|
||||
const noImageUrl = 'https://place-hold.it/140x140?text=Pa%20ni%20imaj'
|
||||
|
||||
const {alias, biyografi, teks, foto, slug} = anAwtis
|
||||
const {alias, biographie, paroles, photo, slug} = artiste
|
||||
|
||||
const [expanded, setExpanded] = useState(false)
|
||||
|
||||
@@ -76,7 +78,7 @@ export default function AwtisKat({anAwtis}) {
|
||||
className={classes.media}
|
||||
component='img'
|
||||
alt={alias}
|
||||
image={`${foto.length > 0 ? `${process.env.NEXT_PUBLIC_API_URL}${foto[0].url}` : noImageUrl}`}
|
||||
image={`${photo?.data?.attributes?.url ? `${IMAGE_URL}${photo?.data?.attributes?.url}` : noImageUrl}`}
|
||||
title={alias}
|
||||
/>
|
||||
<CardContent>
|
||||
@@ -84,7 +86,7 @@ export default function AwtisKat({anAwtis}) {
|
||||
{alias}
|
||||
</Typography>
|
||||
<Typography align='center' variant='body2' color='textSecondary' component='h5'>
|
||||
{anAwtis.teks.length} tèks
|
||||
{`${paroles.data.length} ${paroles.data.length > 1 ? 'textes' : 'texte'}`}
|
||||
</Typography>
|
||||
</CardContent>
|
||||
</CardActionArea>
|
||||
@@ -104,15 +106,15 @@ export default function AwtisKat({anAwtis}) {
|
||||
</CardActions>
|
||||
<Collapse unmountOnExit in={expanded} timeout='auto'>
|
||||
<CardContent>
|
||||
<MizikLis teks={teks} />
|
||||
<MizikLis paroles={paroles.data} />
|
||||
</CardContent>
|
||||
</Collapse>
|
||||
</Card>
|
||||
{esByografiOuve && (
|
||||
<AwtisBiyografi
|
||||
alias={alias}
|
||||
teks={teks}
|
||||
biyografi={biyografi}
|
||||
paroles={paroles.data}
|
||||
biographie={biographie}
|
||||
esByografiOuve={esByografiOuve}
|
||||
meteEsByografiOuve={meteEsByografiOuve}
|
||||
/>
|
||||
@@ -123,5 +125,5 @@ export default function AwtisKat({anAwtis}) {
|
||||
}
|
||||
|
||||
AwtisKat.propTypes = {
|
||||
anAwtis: PropTypes.object.isRequired
|
||||
artiste: PropTypes.object.isRequired
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user