Refreshing the page causes state loss, which causes some values to break.
This is because the data saved in localStorage is saved after the user clicks login, and not in the actual response from the database itself (where it should be happening).
So, while we get a lot of data from google and store it in local storage, like:
photo URL
name
... etc
We don't store other values that are unique to the data store like:
bio
goal
isTutor
... etc
To remedy this, we need to store user values in localStorage after we receive them from the database the first time a.k.a in the response block in:
Refreshing the page causes state loss, which causes some values to break.
This is because the data saved in
localStorage
is saved after the user clicks login, and not in the actual response from the database itself (where it should be happening).So, while we get a lot of data from google and store it in local storage, like:
We don't store other values that are unique to the data store like:
To remedy this, we need to store user values in localStorage after we receive them from the database the first time a.k.a in the response block in: