2023-05-14 22:47:56 +00:00
|
|
|
import { VStack } from '@chakra-ui/react';
|
2023-05-07 22:29:37 +00:00
|
|
|
|
2023-05-14 22:47:56 +00:00
|
|
|
import { selectFiles } from './fileListingSlice';
|
2023-05-08 15:06:52 +00:00
|
|
|
import { useAppSelector } from '../../hooks';
|
2023-05-14 22:47:56 +00:00
|
|
|
import { FileRow } from './FileRow';
|
2023-05-07 22:29:37 +00:00
|
|
|
|
|
|
|
export function FileListing() {
|
|
|
|
const files = useAppSelector(selectFiles);
|
|
|
|
|
|
|
|
return (
|
2023-05-14 22:47:56 +00:00
|
|
|
<VStack>
|
|
|
|
{Object.entries(files).map(([id, file]) => (
|
|
|
|
<FileRow key={id} id={id} file={file} />
|
|
|
|
))}
|
|
|
|
</VStack>
|
2023-05-07 22:29:37 +00:00
|
|
|
);
|
|
|
|
}
|