Commit 880b9f02 authored by Pavel Mishakov's avatar Pavel Mishakov

webinar done

parent 07b61617
......@@ -34,7 +34,7 @@ export const usersSlice = createSlice({
name: namespace,
initialState: {
user: {} as IUser,
isAuth: !!localStorage.getItem('token') || false,
isAuth: false,
loadingUser: false,
messageUser: ''
} as IUsersState,
......
......@@ -11,7 +11,7 @@ const PrivateRoute: React.FunctionComponent = (): React.ReactElement => {
const dispatch: AppDispatch = useDispatch()
useEffect(() => {
dispatch(checkToken())
}, [isAuth])
}, [])
return (
isAuth
?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment