Change teks to parole
This commit is contained in:
@@ -43,15 +43,15 @@ const actions = [
|
||||
{icon: <FileCopyIcon />, name: 'Copier le lien', code: 'copy'}
|
||||
]
|
||||
|
||||
export default function Pataje({teks, setError, setSuccess}) {
|
||||
const {tit, awtis, slug} = teks
|
||||
export default function Pataje({parole, setError, setSuccess}) {
|
||||
const {titre, artistes, slug} = parole
|
||||
const [open, setOpen] = useState(false)
|
||||
|
||||
const patajeUrl = `${SITE_URL}/paroles/${slug}`
|
||||
const alias = awtis.map(({alias}) => alias)
|
||||
const alias = artistes.data.map(({attributes}) => attributes.alias)
|
||||
const renderAwtis = new Intl.ListFormat('fr').format(alias)
|
||||
|
||||
const text = teks.user || teks.userAdmin ? `${renderAwtis} - ${tit} (Paroles et Traductions) - (texte soumis par ${teks?.user?.username || teks.userAdmin})` : `${renderAwtis} - ${tit} (Paroles et Traductions)`
|
||||
const text = parole.user || parole.userAdmin ? `${renderAwtis} - ${titre} (Paroles et Traductions) - (texte soumis par ${parole?.user?.username || parole.userAdmin})` : `${renderAwtis} - ${parole} (Paroles et Traductions)`
|
||||
|
||||
const handleClose = () => {
|
||||
setOpen(false)
|
||||
@@ -123,7 +123,7 @@ export default function Pataje({teks, setError, setSuccess}) {
|
||||
}
|
||||
|
||||
Pataje.propTypes = {
|
||||
teks: PropTypes.object.isRequired,
|
||||
parole: PropTypes.object.isRequired,
|
||||
setError: PropTypes.func.isRequired,
|
||||
setSuccess: PropTypes.func.isRequired
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user