feat: tank performance filters

This commit is contained in:
TrèsAbhi committed 2024-07-02 19:19:15 -05:00
1 parent 4b46eb59e0
commit 4c6369b8b4
9 files changed
+106 -85

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
import { produce } from 'immer';
import { create } from 'zustand';
import { TankopediaSortBy, TankopediaSortDirection } from './tankopedia';
export interface TankopediaSort {
by: TankopediaSortBy;
direction: TankopediaSortDirection;
}
export const useTankopediaSort = create<TankopediaSort>()(() => ({
by: 'meta.none',
direction: 'descending',
}));
export function mutateTankopediaSort(recipe: (draft: TankopediaSort) => void) {
useTankopediaSort.setState(produce(recipe));
}