chore: address code review re file row
This commit is contained in:
parent
837e7655b8
commit
6dd5f04131
@ -18,7 +18,7 @@ import {
|
|||||||
import { DecryptedAudioFile, deleteFile, ProcessState } from './fileListingSlice';
|
import { DecryptedAudioFile, deleteFile, ProcessState } from './fileListingSlice';
|
||||||
import { useCallback, useRef } from 'react';
|
import { useCallback, useRef } from 'react';
|
||||||
import { useAppDispatch } from '~/hooks';
|
import { useAppDispatch } from '~/hooks';
|
||||||
import coverSvgUrl from '~/assets/no-cover.svg';
|
import noCoverFallbackImageURL from '~/assets/no-cover.svg';
|
||||||
|
|
||||||
interface FileRowProps {
|
interface FileRowProps {
|
||||||
id: string;
|
id: string;
|
||||||
@ -86,9 +86,8 @@ export function FileRow({ id, file }: FileRowProps) {
|
|||||||
<Center w="160px" h="160px" m="auto">
|
<Center w="160px" h="160px" m="auto">
|
||||||
<Image
|
<Image
|
||||||
objectFit="cover"
|
objectFit="cover"
|
||||||
src={metadata?.cover}
|
src={metadata?.cover || noCoverFallbackImageURL}
|
||||||
alt={`${metadata?.album} 的专辑封面`}
|
alt={`${metadata?.album} 的专辑封面`}
|
||||||
fallbackSrc={coverSvgUrl}
|
|
||||||
/>
|
/>
|
||||||
</Center>
|
</Center>
|
||||||
</GridItem>
|
</GridItem>
|
||||||
|
Loading…
Reference in New Issue
Block a user