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

Fix Error page next button mobile view #460

Merged
merged 7 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,19 @@ import { stepSiteGenSiteLogo } from '../../../../steps/SiteGen/SiteLogo/step';
* @return {WPComponent} Back Component
*/
const Back = ( { path, showErrorDialog } ) => {
const { setNavErrorContinuePath } = useDispatch( nfdOnboardingStore );
const { setNavErrorContinuePath, updateSiteGenErrorStatus } =
useDispatch( nfdOnboardingStore );
const { siteGenErrorStatus } = useSelect( ( select ) => {
return {
siteGenErrorStatus:
select( nfdOnboardingStore ).getSiteGenErrorStatus(),
};
} );
const navigate = useNavigate();
const navigateBack = () => {
if ( siteGenErrorStatus === true ) {
updateSiteGenErrorStatus( false );
}
if ( showErrorDialog !== false ) {
setNavErrorContinuePath( path );
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
identifier,
skipCache
);

if ( data.body !== null ) {
currentData.sitegen.siteGenMetaStatus.currentStatus += 1;
if (
Expand All @@ -105,15 +106,14 @@
}
} catch ( err ) {
if ( retryCount < MAX_RETRIES_SITE_GEN ) {
performSiteGenMetaGeneration(
return performSiteGenMetaGeneration(
siteInfo,
identifier,
skipCache,
retryCount + 1
);
} else {
updateSiteGenErrorStatus( true );
}
updateSiteGenErrorStatus( true );
}
}

Expand Down Expand Up @@ -172,21 +172,24 @@
initializePlugins( pluginInstallHash );
setInterval( cronTrigger, 45000 );
}
}, [ initialize ] );

Check warning on line 175 in src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteGen/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

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

useEffect( () => {
syncStoreToDB();
generateSiteGenData();
handlePreviousStepTracking();
}, [ location.pathname ] );

Check warning on line 181 in src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteGen/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

React Hook useEffect has missing dependencies: 'generateSiteGenData', 'handlePreviousStepTracking', and 'syncStoreToDB'. Either include them or remove the dependency array

useEffect( () => {
if ( prevSiteGenErrorStatus.current === true && siteGenErrorStatus === false ) {
if (
prevSiteGenErrorStatus.current === true &&
siteGenErrorStatus === false
) {
generateSiteGenData();
syncStoreToDB();
}
prevSiteGenErrorStatus.current = siteGenErrorStatus;
}, [ siteGenErrorStatus ] );

Check warning on line 192 in src/OnboardingSPA/components/NewfoldInterfaceSkeleton/SiteGen/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

React Hook useEffect has missing dependencies: 'generateSiteGenData' and 'syncStoreToDB'. Either include them or remove the dependency array

useEffect( () => {
initializeThemes();
Expand Down
Loading