Skip to content

Commit

Permalink
bug due to useQueresData
Browse files Browse the repository at this point in the history
  • Loading branch information
acharayaP03 committed Oct 29, 2024
1 parent e704c32 commit e83c5b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/features/authentication/useLogin.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function useLogin() {
return loginApi({ email, password });
},
onSuccess: (user) => {
queryClient.setQueriesData(['user'], user); // update the user query with the new user
queryClient.setQueryData(['user'], user.user); // update the user query with the new user
navigate('/dashboard', { replace: true });
},
onError: (error) => {
Expand Down

0 comments on commit e83c5b5

Please sign in to comment.