Skip to content

Commit

Permalink
Merge pull request #460 from newfold-labs/fix-mobile-tryagain
Browse files Browse the repository at this point in the history
Fix Error page next button mobile view
  • Loading branch information
officiallygod authored Feb 21, 2024
2 parents 693a7a6 + cebd407 commit 2d8258b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
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 @@ -100,6 +100,7 @@ const SiteGen = () => {
identifier,
skipCache
);

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

Expand Down

0 comments on commit 2d8258b

Please sign in to comment.