fix: disable cancel button when there is no window history

This commit is contained in:
Mythie
2023-09-28 15:45:22 +10:00
parent 187485678a
commit adf1359527
2 changed files with 1 additions and 1 deletions

View File

@ -120,6 +120,7 @@ export const SigningForm = ({ document, recipient, fields }: SigningFormProps) =
className="dark:bg-muted dark:hover:bg-muted/80 w-full bg-black/5 hover:bg-black/10"
variant="secondary"
size="lg"
disabled={typeof window !== 'undefined' && window.history.length <= 1}
onClick={() => router.back()}
>
Cancel

View File

@ -14,7 +14,6 @@ export const viewedDocument = async ({ token }: ViewedDocumentOptions) => {
});
if (!recipient) {
console.warn(`No recipient found for token ${token}`);
return;
}