chore: wrap actions to a single condition

This commit is contained in:
鲁树人 2023-05-21 15:38:31 +01:00
parent dd035d04a0
commit afc95e0ed3

View File

@ -95,19 +95,21 @@ export function FileRow({ id, file }: FileRowProps) {
<Wrap> <Wrap>
{isDecrypted && ( {isDecrypted && (
<WrapItem> <>
<Button type="button" onClick={togglePlay}> <WrapItem>
/ <Button type="button" onClick={togglePlay}>
</Button> /
</WrapItem> </Button>
</WrapItem>
<WrapItem>
{file.decrypted && (
<Link isExternal href={file.decrypted} download={decryptedName}>
<Button as="span"></Button>
</Link>
)}
</WrapItem>
</>
)} )}
<WrapItem>
{file.decrypted && (
<Link isExternal href={file.decrypted} download={decryptedName}>
<Button as="span"></Button>
</Link>
)}
</WrapItem>
<WrapItem> <WrapItem>
<Button type="button" onClick={handleDeleteRow}> <Button type="button" onClick={handleDeleteRow}>