Fix theme preset switching issue

- Fix preset theme selection in BrandingPage
- Add debug logging to track theme changes
- Properly update currentTheme state when preset is selected
- Match saved theme to preset on initialization
- Remove unused imports
This commit is contained in:
2025-07-07 16:15:21 +02:00
parent 23ec674e05
commit 7e3009cedc
2 changed files with 21 additions and 6 deletions
@@ -36,6 +36,7 @@ export const ThemeCustomizer: React.FC<ThemeCustomizerProps> = ({
const handlePresetSelect = (presetKey: string) => {
const preset = PRESET_THEMES[presetKey];
console.log('Selecting preset:', presetKey, preset); // Debug log
if (preset) {
setSelectedPreset(presetKey);
setLocalTheme(preset.config);
@@ -49,6 +50,7 @@ export const ThemeCustomizer: React.FC<ThemeCustomizerProps> = ({
};
const handleApply = () => {
console.log('Applying theme:', { ...localTheme, customCss }); // Debug log
onChange({ ...localTheme, customCss });
};