Adapt components with API response
This commit is contained in:
@@ -169,14 +169,14 @@ export default function Teks({parole}) {
|
||||
</Box>
|
||||
</Typography>
|
||||
|
||||
{parole?.user?.data && (
|
||||
{parole?.user && (
|
||||
<Typography style={{marginBottom: '1.5em'}} display='block' variant='caption'>
|
||||
<i>parole soumise par {parole.user.data.attributes.username}</i>
|
||||
<i>parole soumise par {parole.user.username}</i>
|
||||
</Typography>
|
||||
)}
|
||||
{parole?.userAdmin?.data && !parole.user.data && (
|
||||
{parole?.userAdmin&& !parole.user && (
|
||||
<Typography style={{marginBottom: '1.5em'}} display='block' variant='caption'>
|
||||
<i>parole soumise par {parole.userAdmin.data.attributes.firstname}</i>
|
||||
<i>parole soumise par {parole.userAdmin.firstname}</i>
|
||||
</Typography>
|
||||
)}
|
||||
{parole.creativeCommons && (
|
||||
@@ -184,8 +184,8 @@ export default function Teks({parole}) {
|
||||
<LicenseModal license={parole.creativeCommons.toLowerCase()} />
|
||||
</Box>
|
||||
)}
|
||||
{parole?.files?.data && (
|
||||
<FilesDialog files={parole.files.data} />
|
||||
{parole?.files && (
|
||||
<FilesDialog files={parole.files} />
|
||||
)}
|
||||
{(parole.okiMizikID || parole.streamAudio.length > 0 || parole.gadeEmbed) && (
|
||||
<Box sx={{textAlign: 'center'}}>
|
||||
|
||||
Reference in New Issue
Block a user