Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing updateInitialize code for plugin installation. #418

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/OnboardingSPA/steps/SiteGen/Preview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
setHeaderActiveView,
setDrawerActiveView,
setCurrentOnboardingData,
updateInitialize,
} = useDispatch( nfdOnboardingStore );

const { currentData, nextStep } = useSelect( ( select ) => {
Expand All @@ -45,7 +46,8 @@
setSidebarActiveView( false );
setHeaderActiveView( HEADER_SITEGEN );
setDrawerActiveView( false );
updateInitialize( true );
}, [ currentData ] );

Check warning on line 50 in src/OnboardingSPA/steps/SiteGen/Preview/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

React Hook useEffect has missing dependencies: 'setDrawerActiveView', 'setHeaderActiveView', 'setIsHeaderEnabled', 'setSidebarActiveView', and 'updateInitialize'. Either include them or remove the dependency array

Check warning on line 50 in src/OnboardingSPA/steps/SiteGen/Preview/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

React Hook useEffect has missing dependencies: 'setDrawerActiveView', 'setHeaderActiveView', 'setIsHeaderEnabled', 'setSidebarActiveView', and 'updateInitialize'. Either include them or remove the dependency array

useEffect( () => {
const fetchHomePagesPatterns = async () => {
Expand Down Expand Up @@ -76,7 +78,7 @@

fetchHomePagesPatterns();
loadGlobalStyles();
}, [] );

Check warning on line 81 in src/OnboardingSPA/steps/SiteGen/Preview/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

React Hook useEffect has missing dependencies: 'currentData', 'homepages', and 'setCurrentOnboardingData'. Either include them or remove the dependency array. You can also do a functional update 'setHomepages(h => ...)' if you only need 'homepages' in the 'setHomepages' call

Check warning on line 81 in src/OnboardingSPA/steps/SiteGen/Preview/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

React Hook useEffect has missing dependencies: 'currentData', 'homepages', and 'setCurrentOnboardingData'. Either include them or remove the dependency array. You can also do a functional update 'setHomepages(h => ...)' if you only need 'homepages' in the 'setHomepages' call

const loadGlobalStyles = async () => {
const globalStylesResponse = await getGlobalStyles();
Expand Down Expand Up @@ -201,7 +203,7 @@
return homepages?.data.map( ( homepage ) =>
createPreviewSettings( homepage?.color?.palette )
);
}, [ homepages.data, globalStyles ] );

Check warning on line 206 in src/OnboardingSPA/steps/SiteGen/Preview/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

React Hook useMemo has a missing dependency: 'createPreviewSettings'. Either include it or remove the dependency array

Check warning on line 206 in src/OnboardingSPA/steps/SiteGen/Preview/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

React Hook useMemo has a missing dependency: 'createPreviewSettings'. Either include it or remove the dependency array

const buildPreviews = () => {
if ( isPreviewLoading ) {
Expand Down