refactored into single method/store

This commit is contained in:
austinried
2021-08-14 16:22:40 +09:00
parent 9cacc4de36
commit a95372fa55
7 changed files with 172 additions and 182 deletions

View File

@@ -46,7 +46,7 @@ export const useStore = create<Store>(
{
name: '@appStore',
getStorage: () => storage,
whitelist: ['settings', 'cache'],
whitelist: ['settings', 'cacheFiles'],
onRehydrateStorage: _preState => {
return async (postState, _error) => {
await postState?.setActiveServer(postState.settings.activeServer, true)