Add Documents back link on the NDA gate

Match the document viewer header so users can leave without
signing, returning to the list instead of the continue URL
that would re-trigger the gate.

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-07-30 12:06:38 +02:00
parent c96bf22e1c
commit 312cb67106
16 changed files with 35 additions and 7 deletions

View File

@@ -25,6 +25,7 @@ import {
MagnifyingGlassPlusIcon,
} from "@phosphor-icons/react";
import { Button } from "@probo/ui/src/v2/Button/Button";
import { Link } from "@probo/ui/src/v2/Button/Link";
import { Callout } from "@probo/ui/src/v2/Callout/Callout";
import { IconButton } from "@probo/ui/src/v2/IconButton/IconButton";
import { Separator } from "@probo/ui/src/v2/Separator/Separator";
@@ -112,7 +113,9 @@ interface NDAPageProps {
// Non-Disclosure Agreement gate: the user reviews the NDA (rendered in the body)
// and signs it via the header action. Signing records the consent events, accepts
// the electronic signature, polls until it is sealed, then returns to the
// continue URL. Reached from the route boundary on NDA_SIGNATURE_REQUIRED.
// continue URL. A Documents back link dismisses without signing (avoids bouncing
// into the continue URL that re-triggers the gate). Reached from the route
// boundary / mutation layer on NDA_SIGNATURE_REQUIRED.
export function NDAPage({ queryRef }: NDAPageProps) {
const { t } = useTranslation("nda");
const localizedPath = useLocalizedPath();
@@ -233,6 +236,16 @@ export function NDAPage({ queryRef }: NDAPageProps) {
<div className={slots.root()}>
<HeaderBand flushBottomSpace>
<div className={slots.header()}>
<Link
to={localizedPath("/documents")}
variant="ghost"
color="neutral"
size={1}
iconStart={<CaretLeftIcon />}
className={slots.back()}
>
{t("back")}
</Link>
<div className={slots.text()}>
<Heading level={1} size={7} weight="medium" highContrast>
{t("title")}

View File

@@ -33,6 +33,7 @@ export function NDAPageSkeleton() {
<div className={slots.root()}>
<HeaderBand flushBottomSpace>
<div className={slots.header()}>
<TextSkeleton size={1} className={`${slots.back()} w-20`} />
<div className={slots.text()}>
<HeadingSkeleton size={7} className="w-80" />
<TextSkeleton size={2} className="w-96" />

View File

@@ -1,4 +1,5 @@
{
"back": "Dokumente",
"title": "Geheimhaltungsvereinbarung",
"subtitle": "{{name}} verlangt von Ihnen die Unterschrift einer Geheimhaltungsvereinbarung, bevor Sie auf Compliance-Dokumente zugreifen können.",
"reviewAndSign": "Prüfen und unterschreiben",

View File

@@ -1,8 +1,9 @@
{
"back": "Documents",
"title": "Non-Disclosure Agreement",
"subtitle": "{{name}} requires you to sign an NDA before accessing compliance documents.",
"reviewAndSign": "Review and sign",
"tryAgain": "Try again",
"sealing": "Sealing your signature\u2026",
"sealing": "Sealing your signature",
"failedDescription": "We encountered an issue processing your signature. Please try again."
}

View File

@@ -1,4 +1,5 @@
{
"back": "Documentos",
"title": "Acuerdo de confidencialidad",
"subtitle": "{{name}} exige la firma de un acuerdo de confidencialidad antes de acceder a los documentos de cumplimiento.",
"reviewAndSign": "Revisar y firmar",

View File

@@ -1,8 +1,9 @@
{
"title": "Accord de confidentialit\u00e9",
"subtitle": "{{name}} exige la signature d'un accord de confidentialit\u00e9 avant d'acc\u00e9der aux documents de conformit\u00e9.",
"back": "Documents",
"title": "Accord de confidentialité",
"subtitle": "{{name}} exige la signature d'un accord de confidentialité avant d'accéder aux documents de conformité.",
"reviewAndSign": "Lire et signer",
"tryAgain": "R\u00e9essayer",
"sealing": "Scellement de votre signature\u2026",
"failedDescription": "Un probl\u00e8me est survenu lors du traitement de votre signature. Veuillez r\u00e9essayer."
"tryAgain": "Réessayer",
"sealing": "Scellement de votre signature",
"failedDescription": "Un problème est survenu lors du traitement de votre signature. Veuillez réessayer."
}

View File

@@ -1,4 +1,5 @@
{
"back": "Dokumen",
"title": "Perjanjian Kerahasiaan",
"subtitle": "{{name}} mengharuskan Anda menandatangani perjanjian kerahasiaan sebelum mengakses dokumen kepatuhan.",
"reviewAndSign": "Tinjau dan tanda tangani",

View File

@@ -1,4 +1,5 @@
{
"back": "Documenti",
"title": "Accordo di riservatezza",
"subtitle": "{{name}} richiede che Lei firmi un accordo di riservatezza prima di accedere ai documenti di conformità.",
"reviewAndSign": "Leggi e firma",

View File

@@ -1,4 +1,5 @@
{
"back": "ドキュメント",
"title": "秘密保持契約",
"subtitle": "{{name}}は、コンプライアンス関連文書へのアクセス前に秘密保持契約NDAへの署名を求めています。",
"reviewAndSign": "確認して署名",

View File

@@ -1,4 +1,5 @@
{
"back": "문서",
"title": "비밀 유지 계약",
"subtitle": "{{name}}에서는 컴플라이언스 문서에 접근하기 전에 비밀 유지 계약(NDA)에 서명하도록 요구합니다.",
"reviewAndSign": "검토 후 서명",

View File

@@ -1,4 +1,5 @@
{
"back": "Dokumenty",
"title": "Umowa o zachowaniu poufności",
"subtitle": "{{name}} wymaga podpisania umowy o zachowaniu poufności przed uzyskaniem dostępu do dokumentów zgodności.",
"reviewAndSign": "Przejrzyj i podpisz",

View File

@@ -1,4 +1,5 @@
{
"back": "Documentos",
"title": "Acordo de Confidencialidade",
"subtitle": "{{name}} exige que assine um acordo de confidencialidade antes de aceder aos documentos de conformidade.",
"reviewAndSign": "Rever e assinar",

View File

@@ -1,4 +1,5 @@
{
"back": "Belgeler",
"title": "Gizlilik Sözleşmesi",
"subtitle": "Uyumluluk belgelerine erişmeden önce {{name}} bir gizlilik sözleşmesi imzalamanızı gerektiriyor.",
"reviewAndSign": "İncele ve imzala",

View File

@@ -1,4 +1,5 @@
{
"back": "Документи",
"title": "Угода про нерозголошення",
"subtitle": "{{name}} вимагає від вас підписати NDA (угоду про нерозголошення) перед доступом до документів з відповідності.",
"reviewAndSign": "Переглянути та підписати",

View File

@@ -1,4 +1,5 @@
{
"back": "文档",
"title": "保密协议",
"subtitle": "{{name}} 要求您在访问合规文档之前签署保密协议。",
"reviewAndSign": "查看并签署",

View File

@@ -26,6 +26,7 @@ export const ndaPage = tv({
slots: {
root: "flex h-dvh flex-col",
header: "flex w-full flex-col gap-3",
back: "-ml-2 self-start",
text: "flex flex-col gap-1",
toolbar: "flex min-h-16 flex-wrap items-center justify-between gap-x-4 gap-y-2",
toolbarStart: "flex min-w-0 flex-wrap items-center gap-2",