demote componnents

This commit is contained in:
tresabhi committed 2026-11-27 21:05:28 -06:00
1 parent 51d2f601bb
commit 076572e7ff
18 files changed
+437 -441

No files matched your search

@@ -1,8 +1,23 @@
import { api } from "../../api/dynamic";
import { withErrorWrapper } from "../../hocs/withErrorWrapper";
import { withLocale } from "../../hocs/withLocale";
import { Tankopedia, TankopediaTab } from "../../stores/tankopedia";
import { SegmentedControl } from "../SegmentedControl";
import styles from "./index.module.css";
export function TankopediaTabs() {
const tanks = await api.tanks();
interface TankopediaTabsProps {
id: number;
}
export const TankopediaTabs = withErrorWrapper(
withLocale<TankopediaTabsProps>(Content)
);
function Content({ id }: TankopediaTabsProps) {
Tankopedia.useInitialization(() => tanks.tanks[id]);
const tab = Tankopedia.use((state) => state.tab);
return (