Skip to content

Fix theme toggle not persisting to localStorage in About page#63

Merged
ghostleek merged 2 commits intofeat/aboutfrom
copilot/sub-pr-59-yet-again
Mar 21, 2026
Merged

Fix theme toggle not persisting to localStorage in About page#63
ghostleek merged 2 commits intofeat/aboutfrom
copilot/sub-pr-59-yet-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 21, 2026

useTheme in About.tsx initialised dark mode state from localStorage but never wrote back on toggle, causing the About page's theme to diverge from the rest of the app on reload.

Change

Added the missing useEffect (+ import) to persist isDark — identical to the pattern already used in App.tsx and UserDashboard.tsx:

useEffect(() => {
  localStorage.setItem('string-theme', isDark ? 'dark' : 'light');
}, [isDark]);

📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
string-v2 Ready Ready Preview, Comment Mar 21, 2026 3:49pm

Copilot AI changed the title [WIP] [WIP] Address feedback from review on 'Feat/about' pull request Fix theme toggle not persisting to localStorage in About page Mar 21, 2026
Copilot AI requested a review from ghostleek March 21, 2026 15:48
@ghostleek ghostleek marked this pull request as ready for review March 21, 2026 16:23
@ghostleek ghostleek merged commit 8b5f1ce into feat/about Mar 21, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants