fix: resolve blank screen caused by redux-persist refactor
Deploy to Vercel / deploy (push) Successful in 1m33s
Deploy to Vercel / deploy (push) Successful in 1m33s
This commit is contained in:
+3
-2
@@ -10,10 +10,11 @@ import {
|
|||||||
PURGE,
|
PURGE,
|
||||||
REGISTER,
|
REGISTER,
|
||||||
} from "redux-persist"
|
} from "redux-persist"
|
||||||
import storage from "redux-persist/lib/storage/session" // use session storage
|
import createWebStorage from "redux-persist/es/storage/createWebStorage"
|
||||||
// import storage from "redux-persist/lib/storage" // use local storage
|
|
||||||
import authReducer from "./auth-slice"
|
import authReducer from "./auth-slice"
|
||||||
|
|
||||||
|
const storage = createWebStorage(import.meta.env.VITE_REDUX_STORAGE ?? "local")
|
||||||
|
|
||||||
const persistConfig = {
|
const persistConfig = {
|
||||||
key: "root",
|
key: "root",
|
||||||
storage,
|
storage,
|
||||||
|
|||||||
Vendored
+1
@@ -1,6 +1,7 @@
|
|||||||
/// <reference types="vite/client" />
|
/// <reference types="vite/client" />
|
||||||
interface ImportMetaEnv {
|
interface ImportMetaEnv {
|
||||||
readonly VITE_SEO_SITE_URL: string
|
readonly VITE_SEO_SITE_URL: string
|
||||||
|
readonly VITE_REDUX_STORAGE: string
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ImportMeta {
|
interface ImportMeta {
|
||||||
|
|||||||
Reference in New Issue
Block a user