Skip to documentation

Design system / Sources & standards

Current repository source

useSubmissionUnsavedChanges.ts

src/components/submissions/useSubmissionUnsavedChanges.ts

This view contains the escaped source read during the deployment build. Code and policy text are unchanged. Markdown is shown as source, not rendered as a document. A new deployment refreshes the content.

"use client";

import { useUnsavedChanges } from "@/hooks/useUnsavedChanges";

const MESSAGE = "You have unsaved submission changes. Leave without saving?";

/** Bind submission copy to the shared document, link and traversal guard. */
export function useSubmissionUnsavedChanges(dirty: boolean) {
  return useUnsavedChanges(dirty, MESSAGE);
}
All sources and standards
Current components and theme tokens. Fictional example data. Source views refresh on deployment; authors maintain contract notes.