(fix:settings/docs) avoid refresh on modal close

This commit is contained in:
ManishMadan2882
2025-01-27 03:32:32 +05:30
parent 49b3ccfe2b
commit 379dd011ff
2 changed files with 65 additions and 57 deletions

View File

@@ -134,12 +134,6 @@ const Documents: React.FC<DocumentsProps> = ({
});
};
useEffect(() => {
if (modalState === 'INACTIVE') {
refreshDocs(undefined, currentPage, rowsPerPage);
}
}, [modalState]);
useEffect(() => {
refreshDocs(undefined, 1, rowsPerPage);
}, [searchTerm]);
@@ -321,6 +315,9 @@ const Documents: React.FC<DocumentsProps> = ({
isOnboarding={isOnboarding}
renderTab={null}
close={() => setModalState('INACTIVE')}
onSuccessfulUpload={() =>
refreshDocs(undefined, currentPage, rowsPerPage)
}
/>
)}
</div>