Skip to content

Commit

Permalink
bug: [ON-2797] fix redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
thehighestprimenumber committed Feb 3, 2025
1 parent 8ce9e6c commit 4ab6b31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/app/[lng]/user/invites/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ const AcceptInvitePage = ({ params: { lng } }: { params: { lng: string } }) => {
const sanitizedEmail = sanitizeInput(email);
const sanitizedCityIds = sanitizeInput(cityIds);

const { data, error } = await acceptInvite({
const { error } = await acceptInvite({
token: sanitizedToken,
cityIds: sanitizedCityIds.split(","),
email: sanitizedEmail,
});

if (!data?.success || !!error) {
if (!!error) {
setError(true);
} else {
router.push(`/`);
Expand Down

0 comments on commit 4ab6b31

Please sign in to comment.