Skip to content

Commit

Permalink
Lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
arunshenoy99 committed Feb 1, 2024
1 parent 92770c3 commit 8d26263
Showing 1 changed file with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,28 @@ const Back = ( { path, showErrorDialog } ) => {
* @return {WPComponent} StepNavigation Component
*/
const StepNavigation = () => {
const { previousStep, currentStep, showErrorDialog } = useSelect( ( select ) => {
return {
previousStep: select( nfdOnboardingStore ).getPreviousStep(),
currentStep: select( nfdOnboardingStore ).getCurrentStep(),
showErrorDialog: select( nfdOnboardingStore ).getShowErrorDialog(),
};
}, [] );
const { previousStep, currentStep, showErrorDialog } = useSelect(
( select ) => {
return {
previousStep: select( nfdOnboardingStore ).getPreviousStep(),
currentStep: select( nfdOnboardingStore ).getCurrentStep(),
showErrorDialog:
select( nfdOnboardingStore ).getShowErrorDialog(),
};
},
[]
);
const isFirstStep = null === previousStep || false === previousStep;
const isPreviewStep = currentStep.path === stepSiteGenPreview.path;
return (
<div className="nfd-onboarding-header--sitegen__step-navigation">
{ isFirstStep ? null : (
<Back
path={ isPreviewStep ? stepSiteGenSiteLogo.path : previousStep.path }
path={
isPreviewStep
? stepSiteGenSiteLogo.path
: previousStep.path
}
showErrorDialog={ showErrorDialog }
/>
) }
Expand Down

0 comments on commit 8d26263

Please sign in to comment.