feat: migrate performance

This commit is contained in:
TrèsAbhi committed 2024-10-07 17:31:13 -05:00
1 parent b31c7a6738
commit 8d51ce2bea
20 files changed
+122 -149

No files matched your search

@@ -8,14 +8,13 @@ export interface TankPerformancePersistent {
playerCountPeriod: PlayerCountPeriod;
}
export const { Provider, use, useMutation, useStore } = createContextualStore(
() =>
create<TankPerformancePersistent>()(
persist(
subscribeWithSelector<TankPerformancePersistent>(() => ({
playerCountPeriod: PlayerCountPeriod.ThisMonth,
})),
{ name: 'tank-performance', merge: (a, b) => lodash.merge(b, a) },
),
export const TankPerformancePersistent = createContextualStore(() =>
create<TankPerformancePersistent>()(
persist(
subscribeWithSelector<TankPerformancePersistent>(() => ({
playerCountPeriod: PlayerCountPeriod.ThisMonth,
})),
{ name: 'tank-performance', merge: (a, b) => lodash.merge(b, a) },
),
),
);
@@ -1,4 +1,4 @@
import { TankPerformanceSortType } from '.';
import type { TankPerformanceSortType } from '.';
export const TankPerformanceSortTypeNames = {
winrate: 'Winrate',
@@ -9,10 +9,9 @@ export interface TankPerformanceSort {
direction: -1 | 1;
}
export const { Provider, use, useMutation, useStore } = createContextualStore(
() =>
create<TankPerformanceSort>()(() => ({
type: 'winrate',
direction: -1,
})),
export const TankPerformanceSort = createContextualStore(() =>
create<TankPerformanceSort>()(() => ({
type: 'winrate',
direction: -1,
})),
);