@@ -2,6 +2,7 @@ import React, {memo, useCallback, useEffect, useRef, useState} from 'react';
22import type { View } from 'react-native' ;
33import { InteractionManager } from 'react-native' ;
44import { GestureHandlerRootView } from 'react-native-gesture-handler' ;
5+ import type { OnyxEntry } from 'react-native-onyx' ;
56import Animated , { FadeIn , LayoutAnimationConfig } from 'react-native-reanimated' ;
67import type { ValueOf } from 'type-fest' ;
78import useFilesValidation from '@hooks/useFilesValidation' ;
@@ -10,6 +11,7 @@ import useResponsiveLayout from '@hooks/useResponsiveLayout';
1011import useThemeStyles from '@hooks/useThemeStyles' ;
1112import { cleanFileName , getFileValidationErrorText } from '@libs/fileDownload/FileUtils' ;
1213import CONST from '@src/CONST' ;
14+ import type * as OnyxTypes from '@src/types/onyx' ;
1315import type ModalType from '@src/types/utils/ModalType' ;
1416import viewRef from '@src/types/utils/viewRef' ;
1517import AttachmentCarouselView from './Attachments/AttachmentCarousel/AttachmentCarouselView' ;
@@ -57,9 +59,12 @@ type AttachmentComposerModalProps = {
5759
5860 /** Should disable send button */
5961 shouldDisableSendButton : boolean ;
62+
63+ /** The report currently being looked at */
64+ report ?: OnyxEntry < OnyxTypes . Report > ;
6065} ;
6166
62- function AttachmentComposerModal ( { onConfirm, onModalShow = ( ) => { } , onModalHide = ( ) => { } , headerTitle, children, shouldDisableSendButton = false } : AttachmentComposerModalProps ) {
67+ function AttachmentComposerModal ( { onConfirm, onModalShow = ( ) => { } , onModalHide = ( ) => { } , headerTitle, children, shouldDisableSendButton = false , report } : AttachmentComposerModalProps ) {
6368 const styles = useThemeStyles ( ) ;
6469 const { translate} = useLocalize ( ) ;
6570 const { shouldUseNarrowLayout} = useResponsiveLayout ( ) ;
@@ -284,6 +289,7 @@ function AttachmentComposerModal({onConfirm, onModalShow = () => {}, onModalHide
284289 setShouldShowArrows = { setShouldShowArrows }
285290 onAttachmentError = { setAttachmentError }
286291 shouldShowArrows = { shouldShowArrows }
292+ report = { report }
287293 />
288294 ) }
289295 < LayoutAnimationConfig skipEntering >
0 commit comments