diff --git a/src/features/authentication/useLogin.js b/src/features/authentication/useLogin.js index 144510f..a084063 100644 --- a/src/features/authentication/useLogin.js +++ b/src/features/authentication/useLogin.js @@ -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");