mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: migrate performance
This commit is contained in:
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,
|
||||
})),
|
||||
);
|
||||
Reference in new issue
Block a user