Implement guard on empty full name before NDA is signed
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { NDASignatureRequiredError, UnAuthenticatedError } from "@probo/relay";
|
||||
import { FullNameRequiredError, NDASignatureRequiredError, UnAuthenticatedError } from "@probo/relay";
|
||||
import { Navigate, useLocation, useRouteError } from "react-router";
|
||||
|
||||
import { getPathPrefix } from "#/utils/pathPrefix";
|
||||
@@ -29,6 +29,18 @@ export function RootErrorBoundary() {
|
||||
);
|
||||
}
|
||||
|
||||
if (error instanceof FullNameRequiredError) {
|
||||
return (
|
||||
<Navigate
|
||||
replace
|
||||
to={{
|
||||
pathname: "/full-name",
|
||||
search: queryString ? "?" + queryString : "",
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
if (error instanceof NDASignatureRequiredError) {
|
||||
return (
|
||||
<Navigate
|
||||
|
||||
Reference in New Issue
Block a user