diff --git a/frontend/src/modals/WrapperModal.tsx b/frontend/src/modals/WrapperModal.tsx index 1a0128713..f17e0a8ad 100644 --- a/frontend/src/modals/WrapperModal.tsx +++ b/frontend/src/modals/WrapperModal.tsx @@ -2,10 +2,15 @@ import React, { useEffect, useRef } from 'react'; import { WrapperModalProps } from './types'; import Exit from '../assets/exit.svg'; -const WrapperModal: React.FC = ({ children, close }) => { +const WrapperModal: React.FC = ({ + children, + close, + isPerformingTask, +}) => { const modalRef = useRef(null); useEffect(() => { + if (isPerformingTask) return; const handleClickOutside = (event: MouseEvent) => { if ( modalRef.current && @@ -36,9 +41,11 @@ const WrapperModal: React.FC = ({ children, close }) => { ref={modalRef} className="relative w-11/12 rounded-2xl bg-white p-10 dark:bg-outer-space sm:w-[512px]" > - + {!isPerformingTask && ( + + )} {children} diff --git a/frontend/src/modals/types/index.ts b/frontend/src/modals/types/index.ts index 2010bbb92..976bf0e9f 100644 --- a/frontend/src/modals/types/index.ts +++ b/frontend/src/modals/types/index.ts @@ -1,4 +1,5 @@ export type WrapperModalProps = { children?: React.ReactNode; + isPerformingTask?: boolean; close: () => void; }; diff --git a/frontend/src/upload/Upload.tsx b/frontend/src/upload/Upload.tsx index 612456d52..b956afd1d 100644 --- a/frontend/src/upload/Upload.tsx +++ b/frontend/src/upload/Upload.tsx @@ -600,7 +600,30 @@ function Upload({ ) : ( @@ -627,6 +650,7 @@ function Upload({ return ( { close(); setDocName('');