feat: hide metadata until is processed

This commit is contained in:
鲁树人 2023-05-08 16:07:47 +01:00
parent c0737a341b
commit 7a12d6c6a1

View File

@ -1,6 +1,6 @@
import { Avatar, Box, Table, TableContainer, Tbody, Td, Text, Th, Thead, Tr, Wrap, WrapItem } from '@chakra-ui/react';
import { selectFiles } from './fileListingSlice';
import { ProcessState, selectFiles } from './fileListingSlice';
import { useAppSelector } from '../../hooks';
export function FileListing() {
@ -27,9 +27,13 @@ export function FileListing() {
<Box as="h4" fontWeight="semibold" mt="1">
{file.metadata.name || file.fileName}
</Box>
<Text>: {file.metadata.album}</Text>
<Text>: {file.metadata.artist}</Text>
<Text>: {file.metadata.albumArtist}</Text>
{file.state === ProcessState.COMPLETE && (
<>
<Text>: {file.metadata.album}</Text>
<Text>: {file.metadata.artist}</Text>
<Text>: {file.metadata.albumArtist}</Text>
</>
)}
</Td>
<Td>
<Wrap>