feat: some more localized links

This commit is contained in:
tresabhi committed 2024-12-27 14:03:43 -06:00
1 parent e0daf85561
commit 9be6725043
2 files changed
+19 -10

No files matched your search

@@ -1,16 +1,23 @@
import { PageWrapper } from '../../../../components/PageWrapper'; import { PageWrapper } from '../../../../components/PageWrapper';
import { TankSearch } from '../../../../components/TankSearch'; import { TankSearch } from '../../../../components/TankSearch';
import { LocaleProvider } from '../../../../hooks/useLocale';
import { App } from '../../../../stores/app'; import { App } from '../../../../stores/app';
import { TankopediaPersistent } from '../../../../stores/tankopediaPersistent'; import { TankopediaPersistent } from '../../../../stores/tankopediaPersistent';
export function Page() { interface PageProps {
locale: string | undefined;
}
export function Page({ locale }: PageProps) {
return ( return (
<PageWrapper color="purple" maxWidth="80rem"> <LocaleProvider locale={locale}>
<TankopediaPersistent.Provider> <PageWrapper color="purple" maxWidth="80rem">
<App.Provider> <TankopediaPersistent.Provider>
<TankSearch /> <App.Provider>
</App.Provider> <TankSearch />
</TankopediaPersistent.Provider> </App.Provider>
</PageWrapper> </TankopediaPersistent.Provider>
</PageWrapper>
</LocaleProvider>
); );
} }
@@ -4,10 +4,12 @@ import ToolLayout from '../../../../layouts/ToolLayout.astro';
import { Page } from './_index'; import { Page } from './_index';
export { getStaticPaths } from '../../index.astro'; export { getStaticPaths } from '../../index.astro';
const { locale } = Astro.params;
--- ---
<ToolLayout tool={tankopediaTool}> <ToolLayout tool={tankopediaTool}>
<Page client:only="react"> <Page {locale} client:only="react">
<Page slot="fallback" /> <Page {locale} slot="fallback" />
</Page> </Page>
</ToolLayout> </ToolLayout>