You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then in Quotes.js, I've got some custom code (with a fetch).
However, the Quotes.js seems to get called even before the user is logged in. This creates a problem as my 'fetch` requires the token that is created at the login page.
The only way I can get it working is to refresh the page.
Hi,
So I'm getting my token on the
actions.js
page by doing this:localStorage.setItem('id_token', JSON.stringify(user.token).replace(/\"/g, ""))
Then in
Quotes.js
, I've got some custom code (with afetch
).However, the
Quotes.js
seems to get called even before the user is logged in. This creates a problem as my 'fetch` requires the token that is created at the login page.The only way I can get it working is to refresh the page.
Is there a way around this?
I tried adding
react-router
but this didn't help.Here's a sample of
Quotes.js
The text was updated successfully, but these errors were encountered: