Skip to content

Commit

Permalink
fixed brand logo issue
Browse files Browse the repository at this point in the history
  • Loading branch information
girish-lokapure committed Nov 28, 2023
1 parent 55ca327 commit 66dc51f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const HeadingWithSubHeading = ( { title, subtitle } ) => {
width: '20px',
height: '20px',
marginBottom: '-2px',
marginRight: '2px',
backgroundImage: 'var(--nfd-onboarding-icon)',
backgroundSize: 'contain',
} }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ import Sidebar from '../../Sidebar';
import ToggleDarkMode from '../../ToggleDarkMode';
import { ThemeProvider } from '../../ThemeContextProvider';
import themeToggleHOC from '../themeToggleHOC';
import { store as nfdOnboardingStore } from '../../../store';
import { useSelect } from '@wordpress/data';
import { useEffect } from '@wordpress/element';
import classNames from 'classnames';

// Wrapping the NewfoldInterfaceSkeleton with the HOC to make theme available
const ThemedNewfoldInterfaceSkeleton = themeToggleHOC(
Expand All @@ -14,10 +18,23 @@ const ThemedNewfoldInterfaceSkeleton = themeToggleHOC(
);

const SiteGen = () => {
const { newfoldBrand } = useSelect( ( select ) => {
return {
newfoldBrand: select( nfdOnboardingStore ).getNewfoldBrand(),
};
}, [] );

useEffect( () => {
document.body.classList.add( `nfd-brand-${ newfoldBrand }` );
}, [ newfoldBrand ] );

return (
<ThemeProvider>
<ThemedNewfoldInterfaceSkeleton
className={ 'nfd-onboarding-skeleton--sitegen' }
className={ classNames(
'nfd-onboarding-skeleton--sitegen',
`brand-${ newfoldBrand }`,

Check failure on line 36 in src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteGen/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

Delete `,`
) }
header={ <Header /> }
content={ <Content /> }
sidebar={ <Sidebar /> }
Expand Down

0 comments on commit 66dc51f

Please sign in to comment.