Skip to content

Commit

Permalink
dark-light theme switching fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Fermatka committed Sep 18, 2024
1 parent 00dbe2c commit e98a9c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion algrtm/src/components/shared/ThemeToggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const ThemeToggle = () => {
}

const toggleDarkMode = () => {
setTheme(theme === "dark" ? "light" : "dark");
setTheme(resolvedTheme === "dark" ? "light" : "dark");
};

return (
Expand Down
2 changes: 1 addition & 1 deletion algrtm/src/providers/providers.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React from "react";

export function Providers({ children }) {
return (
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
<ThemeProvider attribute="class" defaultTheme="system" enableSystem={true}>
{children}
</ThemeProvider>
);
Expand Down

0 comments on commit e98a9c3

Please sign in to comment.