feat: edit headers

This commit is contained in:
tresabhi committed 2024-11-26 20:44:44 -06:00
1 parent 53d811eeef
commit 5f256ed84d
10 files changed
+155 -50

No files matched your search

+11 -6
View File
@@ -6,18 +6,23 @@ import { createContextualStore } from '../core/zustand/createContextualStore';
export interface TierList {
dragging: boolean;
tanks: number[][];
rows: { name: string; tanks: number[] }[];
placedTanks: Set<number>;
}
enableMapSet();
export const tierListInitialState: TierList = {
dragging: false,
rows: tierListRows.map((row) => ({
name: row.name,
tanks: [],
})),
placedTanks: new Set(),
};
export const TierList = createContextualStore(() =>
create<TierList>()(
subscribeWithSelector<TierList>(() => ({
dragging: false,
tanks: tierListRows.map(() => []),
placedTanks: new Set(),
})),
subscribeWithSelector<TierList>(() => tierListInitialState),
),
);