import { DecryptedAudioFile, deleteFile, ProcessState } from './fileListingSlice'; import { useAppDispatch } from '~/hooks'; import { FileError } from './FileError'; import classNames from 'classnames'; interface FileRowProps { id: string; file: DecryptedAudioFile; } export function FileRow({ id, file }: FileRowProps) { const dispatch = useAppDispatch(); const isDecrypted = file.state === ProcessState.COMPLETE; const decryptedName = file.cleanName + '.' + file.ext; return (

{file.cleanName} {isDecrypted && file.ext &&
{file.ext}
}

{file.state === ProcessState.ERROR && } {isDecrypted && (
下载
); }