8by8-org / web-app

http://app.8by8.us
4 stars 15 forks source link

NAN days left in the challenge #195

Open erhaneth opened 1 year ago

erhaneth commented 1 year ago

Problem

On the progress page the number of challenge days shows "NAN", found this when testing https://challenge.8by8.us/signup

Screen Shot 2023-02-07 at 14 20 09

Goal

The amount of days left in the challenge should be a number.

Additional context

When user enter their email second time, they will see this issue.

erhaneth commented 1 year ago

In the progress.js file, you may encounter a situation where the currentUser variable and the contents of localStorage are both null.

Possible Reasons for Null Values User Authentication: The user is not logged in, resulting in a null value for currentUser.

Data Retrieval: An issue in the code prevents the proper retrieval of the user's information, leading to a null value for currentUser.

Empty localStorage: No data has been saved to localStorage, resulting in a null value.

Code Execution Order: The code that sets currentUser and localStorage values has not run yet.