Stop redirecting on sign up errors
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -56,8 +56,8 @@ export default function SignUpPage() {
|
|||||||
onCompleted: (_, e) => {
|
onCompleted: (_, e) => {
|
||||||
if (e) {
|
if (e) {
|
||||||
toast({
|
toast({
|
||||||
title: __("Registration failed"),
|
title: __("Sign up failed"),
|
||||||
description: formatError(__("Registration failed"), e),
|
description: formatError(__("Sign up failed"), e),
|
||||||
variant: "error",
|
variant: "error",
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@@ -72,7 +72,7 @@ export default function SignUpPage() {
|
|||||||
},
|
},
|
||||||
onError: (e) => {
|
onError: (e) => {
|
||||||
toast({
|
toast({
|
||||||
title: __("Registration failed"),
|
title: __("Sign up failed"),
|
||||||
description: e.message,
|
description: e.message,
|
||||||
variant: "error",
|
variant: "error",
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ export default function PasswordSignInPage() {
|
|||||||
),
|
),
|
||||||
variant: "error",
|
variant: "error",
|
||||||
});
|
});
|
||||||
window.location.href = "/";
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,7 +72,6 @@ export default function PasswordSignInPage() {
|
|||||||
description: e.message,
|
description: e.message,
|
||||||
variant: "error",
|
variant: "error",
|
||||||
});
|
});
|
||||||
window.location.href = "/";
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user