import { Trans, useTranslation } from 'react-i18next'
import { ErrorBoundaryFallback } from '../../../shared/components/error-boundary-fallback'
function PdfPreviewErrorBoundaryFallback({
type,
}: {
type: 'preview' | 'pdf' | 'logs'
}) {
const { t } = useTranslation()
const showInfoLink = (
,
]}
/>
)
switch (type) {
case 'pdf':
return (
{t('pdf_viewer_error')}
{showInfoLink}
)
case 'logs':
return (
{t('log_viewer_error')}
{showInfoLink}
)
case 'preview':
default:
return (
{t('pdf_preview_error')}
{showInfoLink}
)
}
}
export default PdfPreviewErrorBoundaryFallback