Skip to content

Commit

Permalink
Merge pull request #620 from newfold-labs/enhance/-fix-onboarding-sen…
Browse files Browse the repository at this point in the history
…try-issues

Fix Onboarding Sentry Issues
  • Loading branch information
officiallygod authored Sep 25, 2024
2 parents bc7bc4f + f1ead39 commit 0c61e8e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/OnboardingSPA/steps/BasicInfo/basicInfoForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,15 @@ const BasicInfoForm = () => {
return select( coreStore );
}, [] );

const { currentData } = useSelect( ( select ) => {
const { currentData, getEntityRecord } = useSelect( ( select ) => {
return {
currentData:
select( nfdOnboardingStore ).getCurrentOnboardingData(),
getEntityRecord: select( coreStore ).getEntityRecord(
'root',
'site',
undefined
),
};
}, [] );

Expand Down Expand Up @@ -101,6 +106,10 @@ const BasicInfoForm = () => {
}, [ siteTitle, siteDesc, siteLogo, socialData ] );

Check warning on line 106 in src/OnboardingSPA/steps/BasicInfo/basicInfoForm.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

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

const updateCoreStore = ( siteLogoTemp, siteTitleTemp, siteDescTemp ) => {
// Check if the record trying to be edited exists
if ( ! getEntityRecord ) {
return;
}
editEntityRecord( 'root', 'site', undefined, {
site_logo: siteLogoTemp?.id ? siteLogoTemp.id : null,
description: siteDescTemp,
Expand Down

0 comments on commit 0c61e8e

Please sign in to comment.