mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 02:37:05 +02:00
fix: persist settings
This commit is contained in:
1 parent
07cdb0788c
commit
b2f026c212
3 files changed
+5
-3
No files matched your search
+2
-1
@@ -1,3 +1,4 @@
|
||||
import { merge } from 'lodash';
|
||||
import { create } from 'zustand';
|
||||
import { persist } from 'zustand/middleware';
|
||||
|
||||
@@ -10,6 +11,6 @@ export const useApp = create<App>()(
|
||||
(set) => ({
|
||||
devBuildAgreementTime: 0,
|
||||
}),
|
||||
{ name: 'app' },
|
||||
{ name: 'app', merge: (a, b) => merge(b, a) },
|
||||
),
|
||||
);
|
||||
@@ -1,4 +1,5 @@
|
||||
import { produce } from 'immer';
|
||||
import { merge } from 'lodash';
|
||||
import { create } from 'zustand';
|
||||
import { persist } from 'zustand/middleware';
|
||||
import { CustomColumnDisplay } from '../app/tools/session/components/CustomColumn';
|
||||
@@ -83,7 +84,7 @@ export const useSession = create<Session>()(
|
||||
],
|
||||
color: 'slate',
|
||||
}),
|
||||
{ name: 'session' },
|
||||
{ name: 'session', merge: (a, b) => merge(b, a) },
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ export const useTankopediaPersistent = create<TankopediaPersistent>()(
|
||||
},
|
||||
mode: isDev() ? 'armor' : 'model',
|
||||
})),
|
||||
{ name: 'tankopedia', merge },
|
||||
{ name: 'tankopedia', merge: (a, b) => merge(b, a) },
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
Reference in new issue
Block a user