iamrita / enhanced-journal

Using ChatGPT for better journaling sessions
MIT License
2 stars 1 forks source link

Refreshing Journal page gives sessionStorage error #22

Open iamrita opened 1 year ago

iamrita commented 1 year ago

Describe the bug

(Modified from original issue which was solved in the entries page)

when you refresh the journal page after logging in, you'll get this error:

ReferenceError: sessionStorage is not defined

To Reproduce

OS

No response

Node version

No response

iamrita commented 1 year ago

Simple fix: moved const email = sessionStorage.getItem("email"); to inside the useEffect() hook.