mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-28 12:23:24 +01:00
18 lines
518 B
TypeScript
18 lines
518 B
TypeScript
import { create } from 'zustand';
|
|||
|
|
import { subscribeWithSelector } from 'zustand/middleware';
|
||
|
|
import { tierListRows } from '../components/TierList/Table/constants';
|
||
|
|
import { createContextualStore } from '../core/zustand/createContextualStore';
|
||
|
|
|
||
|
|
export interface TierList {
|
||
|
|
dragging: boolean;
|
||
|
|
tanks: number[][];
|
||
|
|
}
|
||
|
|
|
||
|
|
export const TierList = createContextualStore(() =>
|
||
|
|
create<TierList>()(
|
||
|
|
subscribeWithSelector<TierList>(() => ({
|
||
|
|
dragging: false,
|
||
|
|
tanks: tierListRows.map(() => []),
|
||
|
|
})),
|
||
|
|
),
|
||
|
|
);
|