feature/dark-mode-toggle
main
Implements a useDarkMode hook and wires it into the Settings > Appearance page.
useDarkMode
Closes #2
Looks good overall, left one inline note.
@@ -0,0 +3,4 @@
export function useDarkMode() {
const [enabled, setEnabled] = useState(() => {
if (typeof window === "undefined") return false;
return localStorage.getItem("theme") === "dark";
Consider using matchMedia to respect the OS preference as the initial default.
matchMedia
@zaphostingpreview can you take a look at this one, seems related to the deploy pipeline?
@zaphostingpreview one more nit, see inline.
No dependencies set.
The note is not visible to the blocked user.
Implements a
useDarkModehook and wires it into the Settings > Appearance page.Closes #2
Looks good overall, left one inline note.
@@ -0,0 +3,4 @@export function useDarkMode() {const [enabled, setEnabled] = useState(() => {if (typeof window === "undefined") return false;return localStorage.getItem("theme") === "dark";Consider using
matchMediato respect the OS preference as the initial default.@zaphostingpreview can you take a look at this one, seems related to the deploy pipeline?
@zaphostingpreview one more nit, see inline.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.