From 5b6bd474c1d645db4978cb4bf23883e8938ddd52 Mon Sep 17 00:00:00 2001 From: arunshenoy99 Date: Thu, 11 Jan 2024 14:55:53 +0530 Subject: [PATCH] Fix fonts for orchid shades, fix typography showing finish --- src/OnboardingSPA/components/App/index.js | 2 +- .../components/Drawer/DrawerPanel/DesignFonts.js | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/OnboardingSPA/components/App/index.js b/src/OnboardingSPA/components/App/index.js index 0bd68d32d..fe9efbd73 100644 --- a/src/OnboardingSPA/components/App/index.js +++ b/src/OnboardingSPA/components/App/index.js @@ -158,7 +158,7 @@ const App = () => { function handleConditionalDesignStepsRoutes() { if ( location?.pathname.includes( 'colors' ) || - location?.pathname.includes( 'fonts' ) + location?.pathname.includes( 'typography' ) ) { const updates = injectInAllSteps( allSteps, diff --git a/src/OnboardingSPA/components/Drawer/DrawerPanel/DesignFonts.js b/src/OnboardingSPA/components/Drawer/DrawerPanel/DesignFonts.js index 1b90783a9..41d672a3a 100644 --- a/src/OnboardingSPA/components/Drawer/DrawerPanel/DesignFonts.js +++ b/src/OnboardingSPA/components/Drawer/DrawerPanel/DesignFonts.js @@ -85,17 +85,17 @@ const DesignFonts = () => { if ( globalStylesCopy?.styles?.typography?.fontFamily && - globalStylesCopy?.styles?.blocks[ 'core/heading' ]?.typography - ?.fontFamily + globalStylesCopy?.styles?.blocks[ 'core/heading' ] ) { globalStylesCopy.styles.typography.fontFamily = fontPalettesCopy[ fontStyle ]?.styles?.typography?.fontFamily; - globalStylesCopy.styles.blocks[ - 'core/heading' - ].typography.fontFamily = - fontPalettesCopy[ fontStyle ]?.styles.blocks[ - 'core/heading' - ].typography.fontFamily; + globalStylesCopy.styles.blocks[ 'core/heading' ] = { + ...globalStylesCopy.styles.blocks[ 'core/heading' ], + typography: + fontPalettesCopy[ fontStyle ]?.styles.blocks[ + 'core/heading' + ].typography, + }; } if (