Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
products_lesson_front
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Pavel Mishakov
products_lesson_front
Commits
880b9f02
Commit
880b9f02
authored
Mar 25, 2023
by
Pavel Mishakov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webinar done
parent
07b61617
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
users.slice.ts
src/store/users/users.slice.ts
+1
-1
PrivateRoute.tsx
src/utils/PrivateRoute.tsx
+1
-1
No files found.
src/store/users/users.slice.ts
View file @
880b9f02
...
...
@@ -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
,
...
...
src/utils/PrivateRoute.tsx
View file @
880b9f02
...
...
@@ -11,7 +11,7 @@ const PrivateRoute: React.FunctionComponent = (): React.ReactElement => {
const
dispatch
:
AppDispatch
=
useDispatch
()
useEffect
(()
=>
{
dispatch
(
checkToken
())
},
[
isAuth
])
},
[])
return
(
isAuth
?
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment