Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2023-029
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2023-029
2023-029
Commits
69453655
Commit
69453655
authored
Aug 26, 2023
by
janithgamage1.ed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: update
Desc : update project
parent
f4a3c366
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
Project/Frontend/SignConnectPlus/src/contexts/JWTContext.tsx
Project/Frontend/SignConnectPlus/src/contexts/JWTContext.tsx
+5
-3
No files found.
Project/Frontend/SignConnectPlus/src/contexts/JWTContext.tsx
View file @
69453655
...
...
@@ -56,15 +56,17 @@ export const JWTProvider = ({ children }: { children: React.ReactElement }) => {
const
init
=
async
()
=>
{
try
{
const
serviceToken
=
window
.
localStorage
.
getItem
(
'
serviceToken
'
);
console
.
log
(
verifyToken
(
serviceToken
!
));
if
(
serviceToken
&&
verifyToken
(
serviceToken
))
{
setSession
(
serviceToken
);
const
response
=
await
axios
.
get
(
'
/api/account/me
'
);
const
{
user
}
=
response
.
data
;
//
const response = await axios.get('/api/account/me');
//
const { user } = response.data;
dispatch
({
type
:
LOGIN
,
payload
:
{
isLoggedIn
:
true
,
user
//
user
}
});
}
else
{
...
...
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