Kamahl19 / react-starter

Full-featured typescript starter for React application
https://react-starter-kamahl19.vercel.app
MIT License
95 stars 17 forks source link

latest code is breaking #1507

Closed abhishekp21 closed 5 months ago

abhishekp21 commented 5 months ago

@Kamahl19 The React starter project is excellent, and I'm grateful for it. Today, I fetched the most recent version from the master branch and adhered to the instructions in the readme file. However, I encountered issues when launching the application.

Screenshot 2024-01-31 at 11 14 43 PM

Any suggestion will be grateful.

Kamahl19 commented 5 months ago

@abhishekp21 can you please add console.log(theme) to the beginning of the function setThemeAttr in the Theme.tsx?

abhishekp21 commented 5 months ago

@Kamahl19 PFA Screenshot 2024-02-01 at 6 09 30 AM

Kamahl19 commented 5 months ago

@abhishekp21 Thats because the theme is stored in localstorage under the theme key. You have probably run another application on localhost which also set its theme under the same key.

You need to either purge the localstorage for localhost or change the key under which the theme is stored

abhishekp21 commented 5 months ago

@Kamahl19 Ya, Its true it was my bad. I was running some other application which was causing this issue after purging its seems to be working perfectly. Thanks for the quick response.

Kamahl19 commented 5 months ago

@abhishekp21 I will add a check into Theme.tsx so this doesnt happen again. Thanks!

Kamahl19 commented 5 months ago

@abhishekp21 https://github.com/Kamahl19/react-starter/commit/a03a9dea22da28a78f2f7a8460dc7a0b4b05f294#diff-c867896aa186c0f97e5792cf4955cdd8a40395787491c23a288171a4f153898a