diff --git a/src/features/file-listing/FileListing.tsx b/src/features/file-listing/FileListing.tsx index d137589..c246002 100644 --- a/src/features/file-listing/FileListing.tsx +++ b/src/features/file-listing/FileListing.tsx @@ -10,8 +10,8 @@ export function FileListing() { useEffect(() => { // FIXME: Remove test data - if (files.length === 0) { - dispatch(addNewFile({ id: String(Date.now()), fileName: '测试文件名.mgg', blobURI: '' })); + if (Object.keys(files).length === 0) { + dispatch(addNewFile({ id: 'dummy', fileName: '测试文件名.mgg', blobURI: '' })); } }, []); @@ -26,8 +26,8 @@ export function FileListing() {
- {files.map((file) => ( -