From 482f9c1bcd0edeefafee16cc078d60fff4d57ca5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20FAMIBELLE-PRONZOLA?= Date: Sun, 22 May 2022 13:42:51 +0400 Subject: [PATCH] Fix pataje username --- components/teks/pataje.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/teks/pataje.js b/components/teks/pataje.js index 428b414..0261197 100644 --- a/components/teks/pataje.js +++ b/components/teks/pataje.js @@ -51,7 +51,7 @@ export default function Pataje({parole, setError, setSuccess}) { const alias = artistes.data.map(({attributes}) => attributes.alias) const renderAwtis = new Intl.ListFormat('fr').format(alias) - 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 text = parole.user || parole.userAdmin ? `${renderAwtis} - ${titre} (Paroles et Traductions) - (texte soumis par ${parole?.user?.data?.attributes?.username || parole.userAdmin?.data?.attributes?.username})` : `${renderAwtis} - ${parole} (Paroles et Traductions)` const handleClose = () => { setOpen(false)