Skip to content

Commit

Permalink
import updateThemeStatus to fix a rare case, remove unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
arunshenoy99 committed Jan 4, 2023
1 parent 64679c6 commit d677cd3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
2 changes: 1 addition & 1 deletion build/1.0.0/608.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 9 additions & 15 deletions src/OnboardingSPA/pages/Steps/DesignColors/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { __ } from '@wordpress/i18n';
import { useLocation } from 'react-router-dom';
import { useViewportMatch } from '@wordpress/compose';
import { useState, useEffect } from '@wordpress/element';
Expand All @@ -24,26 +23,21 @@ const StepDesignColors = () => {
const [ pattern, setPattern ] = useState();

const isLargeViewport = useViewportMatch( 'medium' );
const { currentStep, currentData } = useSelect(
( select ) => {
return {
currentStep: select( nfdOnboardingStore ).getStepFromPath(
location.pathname
),
currentData:
select( nfdOnboardingStore ).getCurrentOnboardingData(),
};
},
[]
);
const { currentStep } = useSelect( ( select ) => {
return {
currentStep: select( nfdOnboardingStore ).getStepFromPath(
location.pathname
),
};
}, [] );

const {
setDrawerActiveView,
setIsDrawerOpened,
setSidebarActiveView,
setIsDrawerSuppressed,
setIsHeaderNavigationEnabled

setIsHeaderNavigationEnabled,
updateThemeStatus,
} = useDispatch( nfdOnboardingStore );

useEffect( () => {
Expand Down

0 comments on commit d677cd3

Please sign in to comment.