import { FilesController } from '@/Controllers/FilesController' import { NoPreviewIllustration } from '@standardnotes/icons' import { FileItem } from '@standardnotes/snjs' import Button from '../Button/Button' type Props = { file: FileItem filesController: FilesController isFilePreviewable: boolean tryAgainCallback: () => void } const FilePreviewError = ({ file, filesController, isFilePreviewable, tryAgainCallback }: Props) => { return (
This file can't be previewed.
{isFilePreviewable ? ( <>
There was an error loading the file. Try again, or download the file and open it using another application.
) : ( <>
To view this file, download it and open it using another application.
)}
) } export default FilePreviewError