Skip to content

Commit

Permalink
Fix ownership organizer name
Browse files Browse the repository at this point in the history
  • Loading branch information
vhande committed Nov 12, 2024
1 parent 770cbfc commit 6dac450
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/pages/organizers/[organizerId]/ownerships/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -118,7 +121,7 @@ const Ownership = () => {
<Page>
<Page.Title>
{t('organizers.ownerships.title', {
name: organizer?.name?.[i18n.language],
name: organizerName,
})}
</Page.Title>
<Page.Content>
Expand All @@ -142,7 +145,7 @@ const Ownership = () => {
i18nKey={`${translationsPath}.success`}
values={{
ownerEmail: selectedRequest?.ownerEmail,
organizerName: organizer?.name?.[i18n.language],
organizerName: organizerName,
}}
/>
</Alert>
Expand Down Expand Up @@ -232,7 +235,7 @@ const Ownership = () => {
i18nKey={`${translationsPath}.body`}
values={{
ownerEmail: selectedRequest?.ownerEmail,
organizerName: organizer?.name?.[i18n.language],
organizerName: organizerName,
}}
/>
</Box>
Expand Down

0 comments on commit 6dac450

Please sign in to comment.