fix: resolve blank screen caused by redux-persist refactor
Deploy to Vercel / deploy (push) Successful in 1m33s

This commit is contained in:
2026-06-09 17:43:36 +08:00
parent 1f74a55dff
commit cde8813c77
2 changed files with 4 additions and 2 deletions
+3 -2
View File
@@ -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,
+1
View File
@@ -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 {