Skip to content

Commit

Permalink
fix bug: pushing instead of refreshing to the new path
Browse files Browse the repository at this point in the history
  • Loading branch information
azeddine-hmd committed Jan 8, 2024
1 parent c687f9a commit 854ef77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/app/(auth)/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default function Login() {
await delay(500);
return await api.post("/api/auth/login", { ...form });
},
onSuccess: () => router.push("/"),
onSuccess: () => window.location.assign("/channels/friends"),
onError: (error: AxiosError) => {
setOnLoading(false);
setError((error.response?.data as HttpError).message);
Expand Down

0 comments on commit 854ef77

Please sign in to comment.