diff --git a/assets/images/attachment-not-found.svg b/assets/images/attachment-not-found.svg new file mode 100644 index 000000000000..25da973ce9cb --- /dev/null +++ b/assets/images/attachment-not-found.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/Attachments/AttachmentCarousel/CarouselItem.tsx b/src/components/Attachments/AttachmentCarousel/CarouselItem.tsx index 746d94916619..37e233199b37 100644 --- a/src/components/Attachments/AttachmentCarousel/CarouselItem.tsx +++ b/src/components/Attachments/AttachmentCarousel/CarouselItem.tsx @@ -84,7 +84,7 @@ function CarouselItem({item, onPress, isFocused, isModalHovered}: CarouselItemPr isHovered={isModalHovered} isFocused={isFocused} duration={item.duration} - fallbackSource={Expensicons.Exclamation} + fallbackSource={Expensicons.AttachmentNotFound} /> diff --git a/src/components/Attachments/AttachmentView/index.tsx b/src/components/Attachments/AttachmentView/index.tsx index 46590f4985ec..f8b1049f0979 100644 --- a/src/components/Attachments/AttachmentView/index.tsx +++ b/src/components/Attachments/AttachmentView/index.tsx @@ -226,18 +226,17 @@ function AttachmentView({ {translate('attachmentView.attachmentNotFound')} - {translate('attachmentView.verifyAttachmentURL')} ); } + let imageSource = imageError && fallbackSource ? (fallbackSource as string) : (source as string); if (isHighResolution) { diff --git a/src/components/Icon/Expensicons.ts b/src/components/Icon/Expensicons.ts index 569e467dfad7..7deed676d8b2 100644 --- a/src/components/Icon/Expensicons.ts +++ b/src/components/Icon/Expensicons.ts @@ -6,6 +6,7 @@ import ArrowDownLong from '@assets/images/arrow-down-long.svg'; import ArrowRightLong from '@assets/images/arrow-right-long.svg'; import ArrowRight from '@assets/images/arrow-right.svg'; import ArrowUpLong from '@assets/images/arrow-up-long.svg'; +import AttachmentNotFound from '@assets/images/attachment-not-found.svg'; import UpArrow from '@assets/images/arrow-up.svg'; import ArrowsUpDown from '@assets/images/arrows-updown.svg'; import AdminRoomAvatar from '@assets/images/avatars/admin-room.svg'; @@ -214,6 +215,7 @@ export { ArrowsUpDown, ArrowUpLong, ArrowDownLong, + AttachmentNotFound, Wrench, BackArrow, Bank, diff --git a/src/languages/en.ts b/src/languages/en.ts index d0bcbf58f5f1..caf7caa16b5b 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -1940,8 +1940,7 @@ const translations = { afterLinkText: 'to view it.', formLabel: 'View PDF', }, - attachmentNotFound: 'Attachment not found', - verifyAttachmentURL: 'Please verify that the file address is valid', + attachmentNotFound: 'Attachment not found' }, messages: { errorMessageInvalidPhone: `Please enter a valid phone number without brackets or dashes. If you're outside the US, please include your country code (e.g. ${CONST.EXAMPLE_PHONE_NUMBER}).`, diff --git a/src/languages/es.ts b/src/languages/es.ts index a190a3244719..85812eecf77a 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -1959,8 +1959,7 @@ const translations = { afterLinkText: 'para verlo.', formLabel: 'Ver PDF', }, - attachmentNotFound: 'Adjunto no encontrado', - verifyAttachmentURL: 'Por favor verifique que la URL del archivo sea válida' + attachmentNotFound: 'Adjunto no encontrado' }, messages: { errorMessageInvalidPhone: `Por favor, introduce un número de teléfono válido sin paréntesis o guiones. Si reside fuera de Estados Unidos, por favor incluye el prefijo internacional (p. ej. ${CONST.EXAMPLE_PHONE_NUMBER}).`,