fix: only show download button if it's a file

This commit is contained in:
Arnaud Lier 2020-09-13 09:35:35 +02:00 committed by GitHub
parent 8c6c271916
commit 34117017ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -171,7 +171,9 @@ const FileDropdownMenu = ({ file }: { file: FileObject }) => {
<Row onClick={doArchive} icon={faFileArchive} title={'Archive'}/>
</Can>
}
{file.isFile &&
<Row onClick={doDownload} icon={faFileDownload} title={'Download'}/>
}
<Can action={'file.delete'}>
<Row onClick={() => setShowConfirmation(true)} icon={faTrashAlt} title={'Delete'} $danger/>
</Can>