lazzaror / MI-449-js-localstorage

Site that alternates between night and day, counts and remembers page visits
https://lazzaror-js-localstorage.surge.sh/
0 stars 0 forks source link

Project Feedback #1

Open lazzaror opened 4 years ago

lazzaror commented 4 years ago

Build a website that allows the user to switch between day and night color themes and remembers their choice

@egillespie Can you take a look at this? It's hosted here and meets the following criteria:

egillespie commented 4 years ago

Sweeeet, I really like the different background based on the theme and that it's totally based on a CSS class! The local storage part is working great too. Nice job! 🤘

I have one recommendation to touch up the page counter. Would you mind trying this out?

Show 1 on first visit to page

When I first visited the page, I saw NaN as the page count:

image

On subsequent visits I saw the number start at 1 and increase each time I refreshed the page, so I'm convinced that the local storage bit is working correctly.

Would you mind adjusting the code so it shows 1 on the first page visit instead of NaN? You can run window.localStorage.clear() to remove all of the saved values in local storage to reproduce this issue.


After you’ve made your changes and pushed them to GitHub and your hosted site, give it a once-over to make sure it looks right, then comment back here and I’ll take another look.

Thanks! 🎸

lazzaror commented 4 years ago

Thanks! Just fixed it

egillespie commented 4 years ago

Nailed it. Nice work! 🔨 :shipit: