mirror of
https://github.com/usatiuk/writer.git
synced 2025-10-29 00:17:48 +01:00
persist only jwt token
This commit is contained in:
@@ -2,6 +2,7 @@ import { combineReducers } from "redux";
|
||||
import { persistReducer } from "redux-persist";
|
||||
import storage from "redux-persist/lib/storage";
|
||||
import { authReducer, IAuthState } from "~redux/auth/reducer";
|
||||
|
||||
import { IUserState, userReducer } from "./user/reducer";
|
||||
|
||||
export interface IAppState {
|
||||
@@ -10,8 +11,9 @@ export interface IAppState {
|
||||
}
|
||||
|
||||
const authPersistConfig = {
|
||||
key: "jwt",
|
||||
key: "auth",
|
||||
storage,
|
||||
whitelist: ["jwt"],
|
||||
};
|
||||
|
||||
export const rootReducer = combineReducers({
|
||||
|
||||
@@ -1,14 +1,7 @@
|
||||
import { delay } from "redux-saga";
|
||||
import {
|
||||
all,
|
||||
call,
|
||||
cancel,
|
||||
fork,
|
||||
put,
|
||||
race,
|
||||
takeLatest,
|
||||
} from "redux-saga/effects";
|
||||
import { all, call, put, race, takeLatest } from "redux-saga/effects";
|
||||
import { fetchUser } from "~redux/api/user";
|
||||
|
||||
import { getUserFail, getUserSuccess, UserTypes } from "./actions";
|
||||
|
||||
function* getUser() {
|
||||
|
||||
Reference in New Issue
Block a user