Skip to content

Commit

Permalink
Initialize plugins in the fork step
Browse files Browse the repository at this point in the history
  • Loading branch information
arunshenoy99 committed Jun 4, 2024
1 parent 5d73dec commit 3c9dedc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/OnboardingSPA/steps/TheFork/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { useNavigate } from 'react-router-dom';
// Classes and functions
import getContents from './contents';
import { injectMigrationStep } from '../../data/flows/utils';
import { init as initializePlugins } from '../../utils/api/plugins';

// Components
import StartOptions from '../../components/StartOptions';
Expand All @@ -30,14 +31,15 @@ import { store as nfdOnboardingStore } from '../../store';
import { DEFAULT_FLOW } from '../../data/flows/constants';

const TheFork = () => {
const { migrationUrl, canMigrateSite, allSteps } = useSelect(
const { migrationUrl, canMigrateSite, allSteps, pluginInstallHash } = useSelect(
( select ) => {
return {
migrationUrl: select( nfdOnboardingStore ).getMigrationUrl(),
canMigrateSite: select( nfdOnboardingStore ).canMigrateSite(),
allSteps: select( nfdOnboardingStore ).getAllSteps(),
currentStep: select( nfdOnboardingStore ).getCurrentStep(),
routes: select( nfdOnboardingStore ).getRoutes(),
pluginInstallHash: select( nfdOnboardingStore ).getPluginInstallHash(),
};
}
);
Expand All @@ -60,6 +62,7 @@ const TheFork = () => {
setHeaderActiveView( HEADER_SITEGEN );
setDrawerActiveView( false );
setFooterActiveView( FOOTER_SITEGEN );
initializePlugins( pluginInstallHash );
} );

const oldFlow = window.nfdOnboarding?.oldFlow
Expand Down

0 comments on commit 3c9dedc

Please sign in to comment.