Skip to content

Commit

Permalink
fix: redirecting after successfully from submition
Browse files Browse the repository at this point in the history
  • Loading branch information
raczu committed Jun 23, 2024
1 parent 40dd22b commit 197dded
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Client/reasn-client/apps/web/app/login/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ export const loginAction = async (
try {
const payload = await login(result.data);
setToken(payload);
redirect("/");
} catch (e) {
return handleErrorMessage(e);
}

redirect("/");
};
3 changes: 2 additions & 1 deletion Client/reasn-client/apps/web/app/register/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ export const registerAction = async (

try {
await register(RegisterRequestMapper.fromObject(result.data));
redirect("/login");
} catch (e) {
return handleErrorMessage(e);
}

redirect("/login");
};

0 comments on commit 197dded

Please sign in to comment.