fix: persist settings

This commit is contained in:
TrèsAbhi committed 2024-02-27 17:56:01 -06:00
1 parent 07cdb0788c
commit b2f026c212
3 files changed
+5 -3

No files matched your search

+2 -1
View File
@@ -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) },
),
);
+2 -1
View File
@@ -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) },
),
);
+1 -1
View File
@@ -128,7 +128,7 @@ export const useTankopediaPersistent = create<TankopediaPersistent>()(
},
mode: isDev() ? 'armor' : 'model',
})),
{ name: 'tankopedia', merge },
{ name: 'tankopedia', merge: (a, b) => merge(b, a) },
),
);