chore: make download button work

This commit is contained in:
Jixun Wu 2023-05-09 21:02:52 +01:00
parent 7caeb4b07b
commit 6ca0f46af3
1 changed files with 23 additions and 2 deletions

View File

@ -1,4 +1,18 @@
import { Avatar, Box, Table, TableContainer, Tbody, Td, Text, Th, Thead, Tr, Wrap, WrapItem } from '@chakra-ui/react';
import {
Avatar,
Box,
Link,
Table,
TableContainer,
Tbody,
Td,
Text,
Th,
Thead,
Tr,
Wrap,
WrapItem,
} from '@chakra-ui/react';
import { ProcessState, selectFiles } from './fileListingSlice';
import { useAppSelector } from '../../hooks';
@ -38,7 +52,14 @@ export function FileListing() {
<Td>
<Wrap>
<WrapItem></WrapItem>
<WrapItem></WrapItem>
<WrapItem>
{/* TODO: Use correct file name */}
{file.decrypted && (
<Link isExternal href={file.decrypted} download="test.flac">
</Link>
)}
</WrapItem>
<WrapItem></WrapItem>
</Wrap>
</Td>