Skip to content

Commit

Permalink
Merge pull request #7 from softstack/darkmode
Browse files Browse the repository at this point in the history
refactor: Update ConnectOverlay component to use localStorage instead…
  • Loading branch information
daniel-vahn authored May 28, 2024
2 parents 7fc3dd5 + aa923e8 commit 3663387
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/connectOverlay/ConnectOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const ConnectOverlay: React.FC<Props> = ({
useEffect(() => {
setDarkMode(WebApp.colorScheme === 'dark');
document.documentElement.classList.toggle('dark', darkMode);
localStorage.setItem('theme', darkMode ? 'dark' : 'light');
window.localStorage.setItem('theme', darkMode ? 'dark' : 'light');
}, [WebApp.colorScheme]);

const [networksExpanded, setNetworksExpanded] = useState(true);
Expand Down

0 comments on commit 3663387

Please sign in to comment.