Implement guard on empty full name before NDA is signed

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-03-05 17:07:58 +04:00
parent 6896c1bbb8
commit 97e957f394
19 changed files with 637 additions and 91 deletions

View File

@@ -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