mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-29 04:44:23 +01:00
demote componnents
This commit is contained in:
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 (
|
||||
|
||||
Reference in new issue
Block a user