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

Improve Error Handling for FacebookConnectButton #571

Merged
merged 1 commit into from
Jun 5, 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
6 changes: 5 additions & 1 deletion src/OnboardingSPA/steps/SiteGen/SocialMedia/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
if ( interacted && connected ) {
navigate( nextStep.path );
}
}, [ interacted, connected ] );

Check warning on line 69 in src/OnboardingSPA/steps/SiteGen/SocialMedia/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

React Hook useEffect has missing dependencies: 'navigate', 'nextStep.path', and 'setIsFooterNavAllowed'. Either include them or remove the dependency array

Check warning on line 69 in src/OnboardingSPA/steps/SiteGen/SocialMedia/index.js

View workflow job for this annotation

GitHub Actions / Run Lint Checks

React Hook useEffect has missing dependencies: 'navigate', 'nextStep.path', and 'setIsFooterNavAllowed'. Either include them or remove the dependency array

const handleConnect = () => {
trackOnboardingEvent(
Expand All @@ -78,7 +78,11 @@
setConnected( true );
};

const handleFailure = () => {
const handleFailure = ( error ) => {
// This happens when a call is made to retrieve the facebook details when the button first renders.
if ( 404 === error?.data?.status ) {
return;
}
updateSiteGenErrorStatus( true );
};

Expand Down
Loading