Skip to content

Commit

Permalink
fix: ensure page view tracker and skiplink are wrapped in i18n provider
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanprobst authored and kevinstadler committed Feb 7, 2025
1 parent ee2c9f0 commit 6a4fee8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,6 @@ export default function LocaleLayout(props: LocaleLayoutProps): ReactNode {

<ColorSchemeScript />

<AnalyticsScript baseUrl={env.NEXT_PUBLIC_MATOMO_BASE_URL} id={env.NEXT_PUBLIC_MATOMO_ID} />

<SkipLink targetId={id}>{t("skip-to-main-content")}</SkipLink>

{/**
* @see https://react-spectrum.adobe.com/react-aria/ssr.html#optimizing-bundle-size
*
Expand All @@ -131,6 +127,13 @@ export default function LocaleLayout(props: LocaleLayoutProps): ReactNode {
"TranslatorsPage",
])}
>
<AnalyticsScript
baseUrl={env.NEXT_PUBLIC_MATOMO_BASE_URL}
id={env.NEXT_PUBLIC_MATOMO_ID}
/>

<SkipLink targetId={id}>{t("skip-to-main-content")}</SkipLink>

<AppLayout>
<AppHeader />
{children}
Expand Down

0 comments on commit 6a4fee8

Please sign in to comment.