From 6dac4507c210511df332a9db1984806cd2ba2b9d Mon Sep 17 00:00:00 2001 From: vhande <78013271+vhande@users.noreply.github.com> Date: Tue, 12 Nov 2024 14:46:13 +0100 Subject: [PATCH] Fix ownership organizer name --- .../organizers/[organizerId]/ownerships/index.page.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/pages/organizers/[organizerId]/ownerships/index.page.tsx b/src/pages/organizers/[organizerId]/ownerships/index.page.tsx index cd5891ddb..2344673ff 100644 --- a/src/pages/organizers/[organizerId]/ownerships/index.page.tsx +++ b/src/pages/organizers/[organizerId]/ownerships/index.page.tsx @@ -60,6 +60,9 @@ const Ownership = () => { }); // @ts-expect-error const organizer: Organizer = getOrganizerByIdQuery?.data; + const organizerName = + organizer?.name?.[i18n.language] ?? + organizer?.name?.[organizer.mainLanguage]; const getOwnershipRequestsQuery = useGetOwnershipRequestsQuery({ organizerId: organizerId, @@ -118,7 +121,7 @@ const Ownership = () => { {t('organizers.ownerships.title', { - name: organizer?.name?.[i18n.language], + name: organizerName, })} @@ -142,7 +145,7 @@ const Ownership = () => { i18nKey={`${translationsPath}.success`} values={{ ownerEmail: selectedRequest?.ownerEmail, - organizerName: organizer?.name?.[i18n.language], + organizerName: organizerName, }} /> @@ -232,7 +235,7 @@ const Ownership = () => { i18nKey={`${translationsPath}.body`} values={{ ownerEmail: selectedRequest?.ownerEmail, - organizerName: organizer?.name?.[i18n.language], + organizerName: organizerName, }} />