From 1d0e09d8cd0bd9d6611c0234663c1ddf7c91c5e0 Mon Sep 17 00:00:00 2001 From: Christoph Pader Date: Thu, 6 Feb 2025 16:22:11 -0800 Subject: [PATCH] fix: fallbackRoute must be of type Route --- .../AttachmentModalContent/BaseContent.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/media/AttachmentModalScreen/AttachmentModalContent/BaseContent.tsx b/src/pages/media/AttachmentModalScreen/AttachmentModalContent/BaseContent.tsx index bc4fe5dc81c0..4d04f42238e0 100644 --- a/src/pages/media/AttachmentModalScreen/AttachmentModalContent/BaseContent.tsx +++ b/src/pages/media/AttachmentModalScreen/AttachmentModalContent/BaseContent.tsx @@ -37,6 +37,7 @@ import {detachReceipt} from '@userActions/IOU'; import CONST from '@src/CONST'; import type {TranslationPaths} from '@src/languages/types'; import ONYXKEYS from '@src/ONYXKEYS'; +import type {Route} from '@src/ROUTES'; import ROUTES from '@src/ROUTES'; import type * as OnyxTypes from '@src/types/onyx'; import {isEmptyObject} from '@src/types/utils/EmptyObject'; @@ -86,7 +87,7 @@ type AttachmentModalBaseContentProps = { /** Optional callback to fire when we want to preview an image and approve it for use. */ onConfirm?: ((file: FileObject) => void) | null; /** Fallback route when the modal is closed */ - fallbackRoute?: string; + fallbackRoute?: Route; /** Optional callback to fire when we want to do something after attachment carousel changes. */ onCarouselAttachmentChange?: (attachment: Attachment) => void; /** Determines if the attachment is invalid or not */