+
Forgot password?
diff --git a/frontend/views/SetupView.tsx b/frontend/views/SetupView.tsx
index b4498bd..84a642f 100644
--- a/frontend/views/SetupView.tsx
+++ b/frontend/views/SetupView.tsx
@@ -39,12 +39,12 @@ function WelcomeStep() {
function ThemeStep() {
const {theme, setTheme} = useTheme();
const [isSelected, setIsSelected] = useState(theme ? theme.includes("light") : false);
- const [currentTheme, setCurrentTheme] = useState(theme?.split('-')[0]);
+ const [currentTheme, setCurrentTheme] = useState(theme?.substring(0, theme?.lastIndexOf("-")));
useLayoutEffect(() => setTheme(`${currentTheme}-${mode()}`), [isSelected]);
function mode(): "light" | "dark" {
- return !isSelected ? "dark" : "light"
+ return isSelected ? "light" : "dark";
}
return (
@@ -61,8 +61,9 @@ function ThemeStep() {
/>
-