Files
blitzkit/packages/website/src/stores/tankopediaSort.ts
T

19 lines
506 B
TypeScript
Raw Normal View History

import { create } from 'zustand';
import { createContextualSafeStore } from '../core/zustand/createContextualSafeStore';
import {
2024-07-09 14:43:33 -05:00
TankopediaSortBy,
TankopediaSortDirection,
} from './tankopediaPersistent';
2024-07-02 19:19:15 -05:00
export interface TankopediaSort {
by: TankopediaSortBy;
direction: TankopediaSortDirection;
}
export const { Provider, use, useMutation, useStore } =
createContextualSafeStore(() =>
create<TankopediaSort>()(() => ({
by: 'meta.none',
direction: 'descending',
})),
);