From d19ed921269b0dc3970a6438661142b12c04f74f Mon Sep 17 00:00:00 2001 From: Antonin CARLIN Date: Tue, 24 Sep 2024 10:52:35 +0200 Subject: [PATCH] fix(profil): elu tags --- src/screens/profil/elu/components/DeclaEluCard.tsx | 3 ++- src/screens/profil/elu/components/InfoEluCard.tsx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/screens/profil/elu/components/DeclaEluCard.tsx b/src/screens/profil/elu/components/DeclaEluCard.tsx index 0fbc654b4..179354f3f 100644 --- a/src/screens/profil/elu/components/DeclaEluCard.tsx +++ b/src/screens/profil/elu/components/DeclaEluCard.tsx @@ -149,7 +149,8 @@ export const EluBlock = ({ } export default function (props: { declaration?: number; cotisation?: number }) { - const { tags: codes } = useGetTags({ tags: ['elu'] }) ?? [] + const { tags: _codes } = useGetTags({ tags: ['elu'] }) + const codes = _codes || [] const [openIban, setOpenIban] = useState(false) const [openDecla, setOpenDecla] = useState(false) const handleOpenIban = () => setOpenIban(true) diff --git a/src/screens/profil/elu/components/InfoEluCard.tsx b/src/screens/profil/elu/components/InfoEluCard.tsx index a908e59f6..356be799e 100644 --- a/src/screens/profil/elu/components/InfoEluCard.tsx +++ b/src/screens/profil/elu/components/InfoEluCard.tsx @@ -58,7 +58,7 @@ const Elu = (props: { mandates: RestElectedProfileResponse['elect_mandates']; ta } export default function (props: { profil: RestElectedProfileResponse }) { - const tags = useGetTags({ tags: ['adherent', 'elu', 'sympathisant'] }) + const { tags } = useGetTags({ tags: ['adherent', 'elu', 'sympathisant'] }) const content = props.profil.elect_mandates.length > 0 ? : return (