hugoleon46 wrote a comment+100 XP
5mos ago
The course was a lot of fun! I loved how you approached each element so clearly, paying attention to the many small details that make all the difference in any project.
Thank you so much for your effort in this course!.
hugoleon46 wrote a comment+100 XP
6mos ago
💡 Fix: White Text on White Background
If your app defaults to Dark Mode (class="dark") despite your preference, it's because the theme logic (in use-appearance.tsx) is falling back to 'system' when no preference is saved. This causes issues if your OS is set to Dark Mode.
There are two ways to fix this:
1. Immediate Fix (Using Browser Console)
To immediately see the correct colors, open your browser's Developer Console and set the theme to light:
localStorage.setItem('appearance', 'light');
// Then, refresh the page.
2. Permanent Fix (Editing Code)
To make Light Mode the permanent default fallback, modify the use-appearance.tsx file and change the default value from 'system' to 'light' in these two places:
In initializeTheme():
const savedAppearance =
(localStorage.getItem('appearance') as Appearance) || 'light';
In useAppearance() Hook's useEffect:
updateAppearance(savedAppearance || 'light');
Final Step: Recompile your assets.
$ composer run dev