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); stopLoading(themeName);
return; return;
} }
console.log("Theme: ", theme);
// If theme is downloaded and is the currently enabled theme, disable it. // If theme is downloaded and is the currently enabled theme, disable it.
if (theme.isDownloaded && themeName === enabledThemeName) { if (theme.isDownloaded && themeName === enabledThemeName) {
@@ -95,7 +93,13 @@ const ThemeSelector = ({ selectedType, setSelectedType, isEditMode }: ThemeSelec
} }
stopLoading(themeName); stopLoading(themeName);
}; };
useEffect(() => {
if (selectedType === 'background') {
setEnabledThemeName('');
}
}, [selectedType]);
return ( return (
<div className="my-2"> <div className="my-2">