From 7a12d6c6a1841bcc2d61438b1f49b064dd3acad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E6=A0=91=E4=BA=BA?= 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} + + )}