Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
refactor - document upload model data will get clear after closing it
Ashraf79c8b688a045
diff --git a/components/documents/add-document-modal.tsx b/components/documents/add-document-modal.tsxindex ec46b7a7..157606cd 100644--- a/components/documents/add-document-modal.tsx+++ b/components/documents/add-document-modal.tsx@@ -246,8 +246,13 @@ export function AddDocumentModal({}};+ const clearModelStates = () => {+ currentFile !== null && setCurrentFile(null);+ notionLink !== null && setNotionLink(null);+ };+return (- <Dialog>+ <Dialog onOpenChange={clearModelStates}><DialogTrigger asChild>{children}</DialogTrigger><DialogContentclassName="text-foreground bg-transparent border-none shadow-none"