From 7b099672339bfed033b017f3ac193404f6d7564c Mon Sep 17 00:00:00 2001 From: Jixun Wu Date: Mon, 8 May 2023 16:07:47 +0100 Subject: [PATCH] feat: hide metadata until is processed --- src/features/file-listing/FileListing.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/features/file-listing/FileListing.tsx b/src/features/file-listing/FileListing.tsx index 6f78041..0dd7b97 100644 --- a/src/features/file-listing/FileListing.tsx +++ b/src/features/file-listing/FileListing.tsx @@ -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() { {file.metadata.name || file.fileName} - 专辑: {file.metadata.album} - 艺术家: {file.metadata.artist} - 专辑艺术家: {file.metadata.albumArtist} + {file.state === ProcessState.COMPLETE && ( + <> + 专辑: {file.metadata.album} + 艺术家: {file.metadata.artist} + 专辑艺术家: {file.metadata.albumArtist} + + )}