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

delete homepage data when prompt changes #468

Merged
merged 4 commits into from
Feb 21, 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/SiteDetails/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
return setCustomerInput( currentData.sitegen.siteDetails.prompt );
}
setIsFooterNavAllowed( false );
}, [] );

Check warning on line 49 in src/OnboardingSPA/steps/SiteGen/SiteDetails/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

React Hook useEffect has missing dependencies: 'currentData.sitegen.siteDetails.prompt', 'setDrawerActiveView', 'setHeaderActiveView', 'setHideFooterNav', 'setIsFooterNavAllowed', 'setIsHeaderEnabled', and 'setSidebarActiveView'. Either include them or remove the dependency array

useEffect( () => {
if (
Expand All @@ -58,10 +58,12 @@
currentData.sitegen.siteDetails.mode = 'simple';
currentData.sitegen.skipCache = true;
currentData.sitegen.sitemapPagesGenerated = false;
currentData.sitegen.homepages.active = {};
currentData.sitegen.homepages.data = {};
setCurrentOnboardingData( currentData );
}
setIsFooterNavAllowed( isValidInput );
}, [ customerInput ] );

Check warning on line 66 in src/OnboardingSPA/steps/SiteGen/SiteDetails/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

React Hook useEffect has missing dependencies: 'currentData', 'isValidInput', 'setCurrentOnboardingData', and 'setIsFooterNavAllowed'. Either include them or remove the dependency array

return (
<SitegenAiStateHandler>
Expand Down
Loading