diff --git a/src/components/FileList/index.tsx b/src/components/FileList/index.tsx index 51ccdce..a073ca4 100644 --- a/src/components/FileList/index.tsx +++ b/src/components/FileList/index.tsx @@ -12,7 +12,6 @@ interface FileListProps { setCurrentFile: (file: CurrentUserFile) => void handleExport: () => void handleEncryptedExport?: () => void - downloadLabel?: string } const FileList = ({ @@ -20,8 +19,7 @@ const FileList = ({ currentFile, setCurrentFile, handleExport, - handleEncryptedExport, - downloadLabel + handleEncryptedExport }: FileListProps) => { const isActive = (file: CurrentUserFile) => file.id === currentFile.id return ( @@ -47,35 +45,34 @@ const FileList = ({ ))} - {!downloadLabel && ( - - {(popupState) => ( - - - - { - popupState.close - handleExport() - }} - > - Export Files - - { - popupState.close - handleEncryptedExport && handleEncryptedExport() - }} - > - Export Encrypted Files - - - - )} - - )} + + {(popupState) => ( + + + + { + popupState.close + handleExport() + }} + > + Export Files + + { + popupState.close + typeof handleEncryptedExport === 'function' && + handleEncryptedExport() + }} + > + Export Encrypted Files + + + + )} + ) }