Commit 69453655 authored by janithgamage1.ed's avatar janithgamage1.ed

fix: update

Desc : update project
parent f4a3c366
......@@ -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 {
......
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