Skip to content

Commit

Permalink
Merge pull request #90 from zacuke/main
Browse files Browse the repository at this point in the history
Fix race condition on login
  • Loading branch information
r0fls authored Nov 29, 2024
2 parents 9040459 + 9c5fe9a commit 626e278
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trading-dashboard/src/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const Login = () => {
if (response.status === 200 && response.data.access_token) {
setToken(response.data.access_token);
console.log('Token set, navigating to /'); // Debug log for navigation
navigate('/');
setTimeout(navigate, 0, '/');
} else {
setError('Invalid username or password');
}
Expand Down

0 comments on commit 626e278

Please sign in to comment.