Skip to content

Commit

Permalink
optimization: replace key in navigate hook (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
prathameshbelurkar committed Jun 27, 2024
1 parent 5e6de45 commit 52984b1
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 @@ -16,7 +16,7 @@ export function useLogin() {
mutationFn: ({ email, password }) => loginApi({ email, password }),
onSuccess: (user) => {
queryClient.setQueriesData(["user"], user);
navigate("/dashboard");
navigate("/dashboard", { replace: true });
},
onError: () => {
toast.error("Provided email or password are incorrect");
Expand Down

0 comments on commit 52984b1

Please sign in to comment.