mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
feat: more filters
This commit is contained in:
1 parent
7020e5641f
commit
b503f4fa8f
5 files changed
+151
-40
No files matched your search
@@ -1,7 +1,8 @@
|
||||
import { produce } from 'immer';
|
||||
import { create } from 'zustand';
|
||||
import { devtools, persist } from 'zustand/middleware';
|
||||
import { TIERS, Tier } from '../core/blitzkrieg/tankopedia';
|
||||
import { TankType, TreeTypeString } from '../components/Tanks';
|
||||
import { Tier } from '../core/blitzkrieg/tankopedia';
|
||||
|
||||
export type TankopediaSortBy = 'tier' | 'name';
|
||||
export type TankopediaSortDirection = 'ascending' | 'descending';
|
||||
@@ -13,6 +14,8 @@ type Tankopedia = {
|
||||
};
|
||||
filters: {
|
||||
tiers: Tier[];
|
||||
types: TankType[];
|
||||
treeTypes: TreeTypeString[];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -25,7 +28,9 @@ export const useTankopedia = create<Tankopedia>()(
|
||||
direction: 'descending',
|
||||
},
|
||||
filters: {
|
||||
tiers: [...TIERS],
|
||||
tiers: [],
|
||||
types: [],
|
||||
treeTypes: [],
|
||||
},
|
||||
}),
|
||||
{ name: 'tankopedia' },
|
||||
|
||||
Reference in new issue
Block a user