Skip to content

Commit b8d4475

Browse files
fix: keep OAuth loading overlay active through saga processing
Agent-Logs-Url: https://github.com/MobilityData/mobilitydatabase-web/sessions/b4256bb5-f74f-4082-9899-f38339538c9a Co-authored-by: Alessandro100 <18631060+Alessandro100@users.noreply.github.com>
1 parent 114f27d commit b8d4475

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/app/[locale]/sign-in/SignIn.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ export default function SignIn(): React.ReactElement {
9797
},
9898
});
9999

100+
React.useEffect(() => {
101+
if (emailLoginError != null) {
102+
setIsOAuthLoading(false);
103+
}
104+
}, [emailLoginError]);
105+
100106
React.useEffect(() => {
101107
if (userProfileStatus === 'registered') {
102108
if (searchParams.has('add_feed')) {
@@ -126,7 +132,6 @@ export default function SignIn(): React.ReactElement {
126132
setIsOAuthLoading(false);
127133
setShowNoEmailSnackbar(true);
128134
} else {
129-
setIsOAuthLoading(false);
130135
dispatch(loginWithProvider({ oauthProvider, userCredential }));
131136
}
132137
})

0 commit comments

Comments
 (0)