import type { OdFileObject } from '../../types' import { FC } from 'react' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { useTranslation } from 'next-i18next' import { getFileIcon } from '../../utils/getFileIcon' import { formatModifiedDateTime, humanFileSize } from '../../utils/fileDetails' import DownloadButtonGroup from '../DownloadBtnGtoup' import { DownloadBtnContainer, PreviewContainer } from './Containers' const DefaultPreview: FC<{ file: OdFileObject }> = ({ file }) => { const { t } = useTranslation() return (
{file.name}
{t('Last modified')}
{formatModifiedDateTime(file.lastModifiedDateTime)}
{t('File size')}
{humanFileSize(file.size)}
{t('MIME type')}
{file.file?.mimeType || t('Unavailable')}
{t('Hashes')}
Quick XOR {file.file.hashes?.quickXorHash || 'Unavailable'}
SHA1 {file.file.hashes?.sha1Hash || 'Unavailable'}
SHA256 {file.file.hashes?.sha256Hash || 'Unavailable'}
) } export default DefaultPreview