chore: made requested changes

Signed-off-by: Adithya Krishna <adi@documenso.com>
This commit is contained in:
Adithya Krishna
2023-12-20 10:36:06 +05:30
parent 1af909835d
commit 84a0c39810

View File

@ -41,10 +41,16 @@ export const DeleteDocumentDialog = ({
const { mutateAsync: deleteDocument, isLoading } = trpcReact.document.deleteDocument.useMutation({ const { mutateAsync: deleteDocument, isLoading } = trpcReact.document.deleteDocument.useMutation({
onSuccess: () => { onSuccess: () => {
router.refresh(); router.refresh();
const deletedFileToastDescription = (
<p>
Your document <span className="text-documenso">{documentTitle}</span> has been
successfully deleted.
</p>
);
toast({ toast({
title: 'Document deleted', title: 'Document deleted',
description: `Your document "${documentTitle}" has been successfully deleted.`, description: deletedFileToastDescription,
duration: 5000, duration: 5000,
}); });
@ -74,7 +80,10 @@ export const DeleteDocumentDialog = ({
<Dialog open={open} onOpenChange={(value) => !isLoading && onOpenChange(value)}> <Dialog open={open} onOpenChange={(value) => !isLoading && onOpenChange(value)}>
<DialogContent> <DialogContent>
<DialogHeader> <DialogHeader>
<DialogTitle>Do you want to delete this document?</DialogTitle> <DialogTitle>
Do you want to delete the <span className="text-documenso">{documentTitle}</span>{' '}
document?
</DialogTitle>
<DialogDescription> <DialogDescription>
Please note that this action is irreversible. Once confirmed, your document will be Please note that this action is irreversible. Once confirmed, your document will be
@ -83,7 +92,7 @@ export const DeleteDocumentDialog = ({
</DialogHeader> </DialogHeader>
{status !== DocumentStatus.DRAFT && ( {status !== DocumentStatus.DRAFT && (
<div className="mt-8"> <div className="mt-4">
<Input <Input
type="text" type="text"
value={inputValue} value={inputValue}