fixed issues with selected type conflicting

This commit is contained in:
SethBurkart123
2023-11-02 19:12:05 +11:00
parent e332977e08
commit 1d58334e4e
+7 -3
View File
@@ -65,8 +65,6 @@ const ThemeSelector = ({ selectedType, setSelectedType, isEditMode }: ThemeSelec
stopLoading(themeName);
return;
}
console.log("Theme: ", theme);
// If theme is downloaded and is the currently enabled theme, disable it.
if (theme.isDownloaded && themeName === enabledThemeName) {
@@ -95,7 +93,13 @@ const ThemeSelector = ({ selectedType, setSelectedType, isEditMode }: ThemeSelec
}
stopLoading(themeName);
};
};
useEffect(() => {
if (selectedType === 'background') {
setEnabledThemeName('');
}
}, [selectedType]);
return (
<div className="my-2">