feat: code split

This commit is contained in:
TrèsAbhi committed 2024-01-06 18:17:04 -06:00
1 parent 857cba902a
commit 5208cf8678
6 files changed
+253 -251

No files matched your search

+5 -2
View File
@@ -6,6 +6,7 @@ import { Tier } from '../core/blitzkrieg/tankDefinitions';
export type TankopediaSortBy = 'tier' | 'name';
export type TankopediaSortDirection = 'ascending' | 'descending';
export type TankopediaTestTankDisplay = 'include' | 'exclude' | 'only';
export type TankopediaMode = 'model' | 'armor';
type Tankopedia = {
sort: {
@@ -24,8 +25,9 @@ type Tankopedia = {
turretYaw: number;
gunPitch: number;
controlsEnabled: boolean;
showGrid: boolean;
};
showSettings: boolean;
mode: TankopediaMode;
};
export const useTankopedia = create<Tankopedia>()(() => ({
@@ -45,8 +47,9 @@ export const useTankopedia = create<Tankopedia>()(() => ({
hullYaw: 0,
turretYaw: 0,
controlsEnabled: true,
showGrid: true,
},
showSettings: false,
mode: 'model',
}));
export default function mutateTankopedia(recipe: (draft: Tankopedia) => void) {