Skip to content

Commit d930b9a

Browse files
fix(RightSide): add delay before navigation after GitHub authentication
1 parent 7684968 commit d930b9a

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

src/components/Auth/RightSide.jsx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -270,17 +270,18 @@ export const RightSide = () => {
270270
withCredentials: true,
271271
})
272272
.then((d) => d?.data);
273-
274-
var check = await checkAuth();
275-
if (axres?.data?.is_signedup) {
276-
if (check.status) {
277-
navigate("/onboarding");
278-
}
279-
} else {
280-
if (check.status) {
281-
navigate("/dashboard");
273+
setTimeout(async () => {
274+
var check = await checkAuth();
275+
if (axres?.data?.is_signedup) {
276+
if (check.status) {
277+
navigate("/onboarding");
278+
}
279+
} else {
280+
if (check.status) {
281+
navigate("/dashboard");
282+
}
282283
}
283-
}
284+
}, 1000);
284285
} catch (error) {
285286
console.error("GitHub auth error:", error);
286287
setIsProcessingGitHubCallback(false);

0 commit comments

Comments
 (0)