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:
@@ -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 });
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user