mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-12-05 15:52:55 +01:00
hocs
This commit is contained in:
1 parent
5ea7bbd6a1
commit
ad78e45f1b
7 files changed
+41
-403
No files matched your search
@@ -5,27 +5,15 @@ import { IncrementalLoader } from "../../../components/IncrementalLoader";
|
||||
import { TankCard } from "../../../components/TankCard";
|
||||
import { TankCards } from "../../../components/TankCards";
|
||||
import { TankSearch } from "../../../components/TankSearch";
|
||||
import { withLocale } from "../../../hocs/withLocale";
|
||||
import { useAwait } from "../../../hooks/useAwait";
|
||||
import { LocaleProvider } from "../../../hooks/useLocale";
|
||||
import { useSearchableTanks } from "../../../hooks/useSearchableTanks";
|
||||
import { useTierCompare } from "../../../hooks/useTierCompare";
|
||||
import { TankFilters } from "../../../stores/tankFilters";
|
||||
|
||||
const { go } = fuzzysort;
|
||||
|
||||
interface PageProps {
|
||||
locale: string;
|
||||
}
|
||||
|
||||
export function Page({ locale, ...props }: PageProps) {
|
||||
return (
|
||||
<LocaleProvider locale={locale}>
|
||||
<Content {...props} />
|
||||
</LocaleProvider>
|
||||
);
|
||||
}
|
||||
|
||||
function Content() {
|
||||
export const Page = withLocale(() => {
|
||||
const tanks = useAwait(() => api.tanks(), "tanks");
|
||||
|
||||
const compareTiers = useTierCompare();
|
||||
@@ -60,7 +48,7 @@ function Content() {
|
||||
<List tanks={tanksFiltered} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
interface ListProps {
|
||||
tanks: string[];
|
||||
|
||||
Reference in new issue
Block a user