mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 19:19:52 +02:00
20 lines
506 B
TypeScript
20 lines
506 B
TypeScript
import { create } from 'zustand';
|
|
import { createContextualSafeStore } from '../core/zustand/createContextualSafeStore';
|
|
import {
|
|
TankopediaSortBy,
|
|
TankopediaSortDirection,
|
|
} from './tankopediaPersistent';
|
|
|
|
export interface TankopediaSort {
|
|
by: TankopediaSortBy;
|
|
direction: TankopediaSortDirection;
|
|
}
|
|
|
|
export const { Provider, use, useMutation, useStore } =
|
|
createContextualSafeStore(() =>
|
|
create<TankopediaSort>()(() => ({
|
|
by: 'meta.none',
|
|
direction: 'descending',
|
|
})),
|
|
);
|