diff --git a/src/components/EReceiptThumbnail.tsx b/src/components/EReceiptThumbnail.tsx index 19e4e70e6549..e3edc7691322 100644 --- a/src/components/EReceiptThumbnail.tsx +++ b/src/components/EReceiptThumbnail.tsx @@ -1,5 +1,6 @@ import React, {useMemo} from 'react'; import {View} from 'react-native'; +import type {OnyxEntry} from 'react-native-onyx'; import {useOnyx} from 'react-native-onyx'; import useStyleUtils from '@hooks/useStyleUtils'; import useThemeStyles from '@hooks/useThemeStyles'; @@ -9,6 +10,7 @@ import colors from '@styles/theme/colors'; import variables from '@styles/variables'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; +import type {Transaction} from '@src/types/onyx'; import Icon from './Icon'; import * as eReceiptBGs from './Icon/EReceiptBGs'; import * as Expensicons from './Icon/Expensicons'; @@ -16,12 +18,15 @@ import * as MCCIcons from './Icon/MCCIcons'; import Image from './Image'; import Text from './Text'; +type EReceiptThumbnailOnyxProps = { + transaction: OnyxEntry; +}; + type IconSize = 'x-small' | 'small' | 'medium' | 'large'; type EReceiptThumbnailProps = { /** TransactionID of the transaction this EReceipt corresponds to. It's used by withOnyx HOC */ - // eslint-disable-next-line react/no-unused-prop-types - transactionID: string | undefined; + transactionID?: string; /** Border radius to be applied on the parent view. */ borderRadius?: number; @@ -155,4 +160,4 @@ function EReceiptThumbnail({transactionID, borderRadius, fileExtension, isReceip EReceiptThumbnail.displayName = 'EReceiptThumbnail'; export default EReceiptThumbnail; -export type {EReceiptThumbnailProps, IconSize}; +export type {EReceiptThumbnailOnyxProps, EReceiptThumbnailProps, IconSize};