|
|
@ -1,7 +1,7 @@
|
|
|
|
import { produce } from 'immer';
|
|
|
|
import { produce } from 'immer';
|
|
|
|
import { setCookie, destroyCookie } from 'nookies';
|
|
|
|
import { setCookie, destroyCookie } from 'nookies';
|
|
|
|
import { create } from 'zustand';
|
|
|
|
import { create } from 'zustand';
|
|
|
|
import { devtools, persist } from 'zustand/middleware';
|
|
|
|
import { devtools, persist, createJSONStorage } from 'zustand/middleware';
|
|
|
|
|
|
|
|
|
|
|
|
import { apiGetMyUserInfo, apiUserLogin, apiUserLogout } from '@/services';
|
|
|
|
import { apiGetMyUserInfo, apiUserLogin, apiUserLogout } from '@/services';
|
|
|
|
|
|
|
|
|
|
|
@ -87,7 +87,7 @@ const useUserStore = create<UserState>()(
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
name: 'user',
|
|
|
|
name: 'user',
|
|
|
|
getStorage: () => localStorage,
|
|
|
|
storage: createJSONStorage(() => localStorage),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|