Skip to content

Commit

Permalink
fix(organization): not french notice
Browse files Browse the repository at this point in the history
  • Loading branch information
ahonestla committed Nov 21, 2024
1 parent ca27483 commit f339659
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions client/src/pages/organizations/[id]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,32 +35,28 @@ export default function Organization() {
queryFn: () => getOrganizationById(id),
throwOnError: true,
});

return (
<RawIntlProvider value={intl}>
{!data?.isFrench && (
{data && !data?.isFrench && (
<Notice closeMode="disallow" type="warning">
{intl.formatMessage({ id: "organizations.notice.not-french" })}
</Notice>
)}
{data?.endDate && (
<Notice closeMode="disallow" type="warning">
{intl.formatMessage({ id: "organizations.notice.closed" })}{" "}
{data.endDate.slice(0, 4)}.
{intl.formatMessage({ id: "organizations.notice.closed" })} {data.endDate.slice(0, 4)}.
</Notice>
)}
<Container>
<Breadcrumb>
<Link href="/">
{intl.formatMessage({ id: "organizations.breadcrumb.home" })}
</Link>
<Link href="/search/organizations">
{intl.formatMessage({ id: "organizations.breadcrumb.search" })}
</Link>
<Link href="/">{intl.formatMessage({ id: "organizations.breadcrumb.home" })}</Link>
<Link href="/search/organizations">{intl.formatMessage({ id: "organizations.breadcrumb.search" })}</Link>
<Link>{getLangFieldValue(locale)(data?.label)}</Link>
</Breadcrumb>
{(isLoading || !data?.id) && <PageSkeleton />}
{data?.id && <OrganizationPresentation data={data} />}
</Container>
</RawIntlProvider>
);
)
}

0 comments on commit f339659

Please sign in to comment.