Skip to content

Commit

Permalink
Fix base color changing to secondary color during live preview
Browse files Browse the repository at this point in the history
  • Loading branch information
wpalani committed Jan 11, 2025
1 parent 22b8a35 commit 4055283
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ const DesignColorsPanel = forwardRef(
}
} );
const paletteObj = {
base: palette?.base,
primary: palette?.primary,
secondary: palette?.secondary || palette?.base,
tertiary: palette?.tertiary || palette?.primary,
Expand Down Expand Up @@ -227,12 +228,10 @@ const DesignColorsPanel = forwardRef(
const colorPaletteIndex =
selectedPalette === 'custom' ? 0 : selectedPalette;
const selectedPaletteColors = colorPalettes[ colorPaletteIndex ];

selectedPaletteColors.primary = selectedColor.primary;
selectedPaletteColors.secondary = selectedColor.secondary;
selectedPaletteColors.base = selectedColor.secondary;
selectedPaletteColors.base = selectedColor.base;
selectedPaletteColors.tertiary = selectedColor.tertiary;

activeColor.palette = convertColorSchema( selectedPaletteColors );
currentData.sitegen.homepages.data[ slug ].color = activeColor;
setCurrentOnboardingData( currentData );
Expand Down

0 comments on commit 4055283

Please sign in to comment.