um-react/src/features/file-listing/FileListing.tsx

18 lines
407 B
TypeScript
Raw Normal View History

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