import type { ElementType } from 'react' import { useTranslation } from 'react-i18next' import importOverleafModules from '../../../../macros/import-overleaf-module.macro' import { BinaryFile, hasProvider } from '../types/binary-file' const tprLinkedFileRefreshError = importOverleafModules( 'tprLinkedFileRefreshError' ) as { import: { LinkedFileRefreshError: ElementType } path: string }[] type FileViewRefreshErrorProps = { file: BinaryFile refreshError: string } export default function FileViewRefreshError({ file, refreshError, }: FileViewRefreshErrorProps) { const isMendeleyOrZotero = hasProvider(file, 'mendeley') || hasProvider(file, 'zotero') return (