mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-12-05 07:43:49 +01:00
feat: tank performance filters
This commit is contained in:
1 parent
4b46eb59e0
commit
4c6369b8b4
9 files changed
+106
-85
No files matched your search
@@ -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));
|
||||
}
|
||||
Reference in new issue
Block a user