mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 20:19:49 +02:00
feat: migrate tier list
This commit is contained in:
1 parent
8bdc4d9b1b
commit
da506083c9
4 files changed
+51
-44
No files matched your search
@@ -0,0 +1,36 @@
|
|||||||
|
import { PageWrapper } from '../../../components/PageWrapper';
|
||||||
|
import { FilterControl } from '../../../components/TankSearch/components/FilterControl';
|
||||||
|
import { TierListControls } from '../../../components/TierList/Controls';
|
||||||
|
import { TierListTable } from '../../../components/TierList/Table';
|
||||||
|
import { TierListTiles } from '../../../components/TierList/Tiles';
|
||||||
|
import { URLManager } from '../../../components/TierList/URLManager';
|
||||||
|
import {
|
||||||
|
LocaleProvider,
|
||||||
|
type LocaleAcceptorProps,
|
||||||
|
} from '../../../hooks/useLocale';
|
||||||
|
import { TankopediaPersistent } from '../../../stores/tankopediaPersistent';
|
||||||
|
import { TierList } from '../../../stores/tierList';
|
||||||
|
|
||||||
|
export function Page({ locale }: LocaleAcceptorProps) {
|
||||||
|
return (
|
||||||
|
<LocaleProvider locale={locale}>
|
||||||
|
<TierList.Provider>
|
||||||
|
<TankopediaPersistent.Provider>
|
||||||
|
<Content />
|
||||||
|
</TankopediaPersistent.Provider>
|
||||||
|
</TierList.Provider>
|
||||||
|
</LocaleProvider>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function Content() {
|
||||||
|
return (
|
||||||
|
<PageWrapper color="orange" maxWidth="100rem">
|
||||||
|
<URLManager />
|
||||||
|
<TierListControls />
|
||||||
|
<TierListTable />
|
||||||
|
<FilterControl />
|
||||||
|
<TierListTiles />
|
||||||
|
</PageWrapper>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
import { tierListTool } from '../../../constants/tools';
|
||||||
|
import ToolLayout from '../../../layouts/ToolLayout.astro';
|
||||||
|
import { Page } from './_index';
|
||||||
|
|
||||||
|
export { getStaticPaths } from '../index.astro';
|
||||||
|
|
||||||
|
const { locale } = Astro.params;
|
||||||
|
---
|
||||||
|
|
||||||
|
<ToolLayout tool={tierListTool}>
|
||||||
|
<Page {locale} client:load />
|
||||||
|
</ToolLayout>
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
import { PageWrapper } from '../../../../components/PageWrapper';
|
|
||||||
import { FilterControl } from '../../../../components/TankSearch/components/FilterControl';
|
|
||||||
import { TierListControls } from '../../../../components/TierList/Controls';
|
|
||||||
import { TierListTable } from '../../../../components/TierList/Table';
|
|
||||||
import { TierListTiles } from '../../../../components/TierList/Tiles';
|
|
||||||
import { URLManager } from '../../../../components/TierList/URLManager';
|
|
||||||
import {
|
|
||||||
LocaleProvider,
|
|
||||||
type LocaleAcceptorProps,
|
|
||||||
} from '../../../../hooks/useLocale';
|
|
||||||
import { TankopediaPersistent } from '../../../../stores/tankopediaPersistent';
|
|
||||||
import { TierList } from '../../../../stores/tierList';
|
|
||||||
|
|
||||||
export function Page({ locale }: LocaleAcceptorProps) {
|
|
||||||
return (
|
|
||||||
<LocaleProvider locale={locale}>
|
|
||||||
<TierList.Provider>
|
|
||||||
<TankopediaPersistent.Provider>
|
|
||||||
<Content />
|
|
||||||
</TankopediaPersistent.Provider>
|
|
||||||
</TierList.Provider>
|
|
||||||
</LocaleProvider>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function Content() {
|
|
||||||
return (
|
|
||||||
<PageWrapper color="orange" maxWidth="100rem">
|
|
||||||
<URLManager />
|
|
||||||
<TierListControls />
|
|
||||||
<TierListTable />
|
|
||||||
<FilterControl />
|
|
||||||
<TierListTiles />
|
|
||||||
</PageWrapper>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,13 +1,7 @@
|
|||||||
---
|
---
|
||||||
import { tierListTool } from '../../../../constants/tools';
|
import LegacyRedirect from '../../../../components/LegacyRedirect.astro';
|
||||||
import ToolLayout from '../../../../layouts/ToolLayout.astro';
|
|
||||||
import { Page } from './_index';
|
|
||||||
|
|
||||||
export { getStaticPaths } from '../../index.astro';
|
export { getStaticPaths } from '../../index.astro';
|
||||||
|
|
||||||
const { locale } = Astro.params;
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<ToolLayout tool={tierListTool}>
|
<LegacyRedirect path="tier-list" />
|
||||||
<Page {locale} client:load />
|
|
||||||
</ToolLayout>
|
|
||||||
Reference in new issue
Block a user