Expires user login session after 5 minutes
This commit was merged in pull request #24.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { createSlice } from "@reduxjs/toolkit";
|
||||
|
||||
const initialState = {
|
||||
userInfo: JSON.parse(localStorage.getItem("profile"))
|
||||
userInfo: localStorage.getItem('profile') && JSON.parse(localStorage.getItem("profile"))
|
||||
};
|
||||
|
||||
export const userSlice = createSlice({
|
||||
|
||||
Reference in New Issue
Block a user