fix: improve theme import modal close behavior

This commit is contained in:
Hachi-R 2025-02-16 19:08:47 -03:00
parent 2246775046
commit e8d5c621ea

View file

@ -58,7 +58,6 @@ export function SettingsAppearance({
const onThemeImported = useCallback(() => {
setIsImportThemeModalVisible(false);
loadThemes();
clearTheme();
}, [clearTheme, loadThemes]);
return (
@ -88,7 +87,10 @@ export function SettingsAppearance({
{importTheme && (
<ImportThemeModal
visible={isImportThemeModalVisible}
onClose={() => setIsImportThemeModalVisible(false)}
onClose={() => {
setIsImportThemeModalVisible(false);
clearTheme();
}}
onThemeImported={onThemeImported}
themeName={importTheme.theme}
authorId={importTheme.authorId}