From f0680831c2bb7f8cbfb70e880c24529bab37846e Mon Sep 17 00:00:00 2001 From: Maksim Eltyshev Date: Wed, 2 Jul 2025 18:26:03 +0200 Subject: [PATCH] fix: Improve PDF viewer cross-browser compatibility Closes #1219 --- .../attachments/Attachments/Item.jsx | 25 +++++++++--------- .../attachments/Attachments/PdfViewer.jsx | 26 +++++++++++++++++++ .../Attachments/PdfViewer.module.scss | 10 +++++++ 3 files changed, 48 insertions(+), 13 deletions(-) create mode 100644 client/src/components/attachments/Attachments/PdfViewer.jsx create mode 100644 client/src/components/attachments/Attachments/PdfViewer.module.scss diff --git a/client/src/components/attachments/Attachments/Item.jsx b/client/src/components/attachments/Attachments/Item.jsx index 1efb4035..24c95bf5 100644 --- a/client/src/components/attachments/Attachments/Item.jsx +++ b/client/src/components/attachments/Attachments/Item.jsx @@ -16,6 +16,7 @@ import Encodings from '../../../constants/Encodings'; import { AttachmentTypes } from '../../../constants/Enums'; import ItemContent from './ItemContent'; import ContentViewer from './ContentViewer'; +import PdfViewer from './PdfViewer'; import CsvViewer from './CsvViewer'; import styles from './Item.module.scss'; @@ -40,10 +41,8 @@ const Item = React.memo(({ id, isVisible }) => { switch (attachment.data.mimeType) { case 'application/pdf': content = ( - // eslint-disable-next-line jsx-a11y/alt-text - ); @@ -60,15 +59,6 @@ const Item = React.memo(({ id, isVisible }) => {