Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transactions - Update Generic Receipts to use ReceiptBackground #34843

Merged
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
d99d92d
implemented receipt image component
FitseTLT Jan 19, 2024
a1f5f69
pass receipt name for non modal display
FitseTLT Jan 19, 2024
7dfd885
minor fix
FitseTLT Jan 19, 2024
e9c7666
changed implementation
FitseTLT Jan 20, 2024
e88e1ce
fix styling
FitseTLT Jan 20, 2024
26fa66b
fix borderRadius
FitseTLT Jan 20, 2024
d4abf53
type fix
FitseTLT Jan 20, 2024
63b41f6
minor fix
FitseTLT Jan 20, 2024
404fd8c
passed transaction prop
FitseTLT Jan 20, 2024
d6c274e
resolved conflict
FitseTLT Jan 23, 2024
9d38d93
updated attachement modal to consider thumnail display
FitseTLT Jan 23, 2024
796c340
minor fix
FitseTLT Jan 23, 2024
e9e2161
minor revert
FitseTLT Jan 23, 2024
dc760ca
small fix
FitseTLT Jan 23, 2024
7e1fd22
fix on thumbnail display logic
FitseTLT Jan 24, 2024
9a94024
minor type fix
FitseTLT Jan 24, 2024
0cfb3cb
Added file type label support for eThumbnail
FitseTLT Jan 25, 2024
c059ed1
pass transactionID for confirmation
FitseTLT Jan 25, 2024
7008a5d
minor fix
FitseTLT Jan 29, 2024
6a05c03
fix unnecessary condition
FitseTLT Jan 29, 2024
3f019a5
update to static icon layout
FitseTLT Jan 29, 2024
7b55b72
resolved conflicts
FitseTLT Jan 31, 2024
6d7481c
changed to isStaticIconLayout
FitseTLT Jan 31, 2024
e61a6c7
typescript fix
FitseTLT Jan 31, 2024
afbb639
set label text black
FitseTLT Jan 31, 2024
7310663
removed inline styles
FitseTLT Feb 1, 2024
21b5f5e
fix on comment
FitseTLT Feb 1, 2024
73f6495
fixed pending waypoints thumbnail display
FitseTLT Feb 1, 2024
10ff3ee
simplified condition
FitseTLT Feb 1, 2024
1f1b3dc
changed to isReceiptThumbnail prop
FitseTLT Feb 1, 2024
1fb6284
separated Ereceipt and thumbnail logic
FitseTLT Feb 5, 2024
45238a6
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Feb 5, 2024
bb10a48
resolve conflicts
FitseTLT Feb 5, 2024
75ca883
minor lint fix
FitseTLT Feb 5, 2024
ee4d711
fix minor typescript issue
FitseTLT Feb 5, 2024
63c88ec
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Feb 6, 2024
5f07c39
fix type
FitseTLT Feb 6, 2024
8f85721
fix based on comments
FitseTLT Feb 6, 2024
7b14b86
fix type
FitseTLT Feb 7, 2024
2a1ddf3
fix typescript
FitseTLT Feb 7, 2024
660ac05
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Feb 8, 2024
4b058fd
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Feb 12, 2024
6dfc00b
minor change
FitseTLT Feb 12, 2024
4a08601
pass iconSize prop
FitseTLT Feb 12, 2024
60c0773
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Feb 13, 2024
8a97cad
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Feb 13, 2024
f721557
use fetching waypoint function
FitseTLT Feb 13, 2024
c31c4b4
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Feb 20, 2024
0f157fc
fix type
FitseTLT Feb 20, 2024
6db9480
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Feb 21, 2024
c44b430
add fallbackIcon
FitseTLT Feb 21, 2024
7025bfa
applied dynamic thumbnail icon size
FitseTLT Feb 21, 2024
2b1c802
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Feb 21, 2024
94174ba
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Feb 22, 2024
9927c84
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Feb 26, 2024
9eb1edd
use primary color for label text color
FitseTLT Feb 26, 2024
04a5193
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Mar 6, 2024
c90ce7e
add Pdf thumbnail
FitseTLT Mar 6, 2024
9f38e25
updated to fixed color code depending on file extensions
FitseTLT Mar 6, 2024
63dc6f6
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Mar 8, 2024
e05df18
remove unnecessary condition
FitseTLT Mar 8, 2024
b6fd6f4
final refactor changes
FitseTLT Mar 8, 2024
4d18121
minor fix
FitseTLT Mar 8, 2024
aa290ff
minor fix
FitseTLT Mar 8, 2024
b6a111a
minor
FitseTLT Mar 8, 2024
8d38141
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Mar 8, 2024
79a95ff
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Mar 11, 2024
7c1cf62
fix typescript
FitseTLT Mar 11, 2024
3fdef47
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Mar 14, 2024
3a4760d
fix type
FitseTLT Mar 14, 2024
02e8025
suppress eslint warning
FitseTLT Mar 14, 2024
d492e62
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Mar 18, 2024
edd747f
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Mar 19, 2024
c32c8fb
updated label font size and line heights
FitseTLT Mar 19, 2024
edf7677
type update
FitseTLT Mar 21, 2024
e3236a3
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Mar 21, 2024
8a02896
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Mar 25, 2024
1bd9230
made label unselectable
FitseTLT Mar 25, 2024
3f2e1d3
fix lint
FitseTLT Mar 25, 2024
ab837e1
Merge branch 'main' into fix-update-to-use-of-ReceiptBackground
FitseTLT Mar 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/components/DistanceEReceipt.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import Icon from './Icon';
import * as Expensicons from './Icon/Expensicons';
import ImageSVG from './ImageSVG';
import PendingMapView from './MapView/PendingMapView';
import ReceiptImage from './ReceiptImage';
import Text from './Text';
import ThumbnailImage from './ThumbnailImage';
import transactionPropTypes from './transactionPropTypes';

const propTypes = {
Expand Down Expand Up @@ -67,11 +67,9 @@ function DistanceEReceipt({transaction}) {
{isOffline || !thumbnailSource ? (
<PendingMapView />
) : (
<ThumbnailImage
previewSourceURL={thumbnailSource}
style={[styles.w100, styles.h100]}
isAuthTokenRequired
shouldDynamicallyResize={false}
<ReceiptImage
source={thumbnailSource}
shouldUseThumnailImage
/>
)}
</View>
Expand Down
10 changes: 8 additions & 2 deletions src/components/EReceiptThumbnail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import * as eReceiptBGs from './Icon/EReceiptBGs';
import * as Expensicons from './Icon/Expensicons';
import * as MCCIcons from './Icon/MCCIcons';
import Image from './Image';
import Text from './Text';

type EReceiptThumbnailOnyxProps = {
transaction: OnyxEntry<Transaction>;
Expand All @@ -24,6 +25,9 @@ type EReceiptThumbnailProps = EReceiptThumbnailOnyxProps & {
/** 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;
borderRadius?: number;
FitseTLT marked this conversation as resolved.
Show resolved Hide resolved
fileExtension?: string;
isThumbnail?: boolean;
};

const backgroundImages = {
Expand All @@ -35,7 +39,7 @@ const backgroundImages = {
[CONST.ERECEIPT_COLORS.PINK]: eReceiptBGs.EReceiptBG_Pink,
};

function EReceiptThumbnail({transaction}: EReceiptThumbnailProps) {
function EReceiptThumbnail({transaction, borderRadius, fileExtension, isThumbnail = false}: EReceiptThumbnailProps) {
const styles = useThemeStyles();
const StyleUtils = useStyleUtils();

Expand Down Expand Up @@ -83,6 +87,7 @@ function EReceiptThumbnail({transaction}: EReceiptThumbnailProps) {
styles.overflowHidden,
styles.alignItemsCenter,
containerHeight && containerHeight < variables.eReceiptThumnailCenterReceiptBreakpoint ? styles.justifyContentCenter : {},
borderRadius ? {borderRadius} : {},
FitseTLT marked this conversation as resolved.
Show resolved Hide resolved
]}
onLayout={onContainerLayout}
>
Expand All @@ -100,7 +105,8 @@ function EReceiptThumbnail({transaction}: EReceiptThumbnailProps) {
fill={secondaryColor}
additionalStyles={[styles.fullScreen]}
/>
{MCCIcon ? (
{isThumbnail && fileExtension && <Text style={styles.labelStrong}>{fileExtension.toUpperCase()}</Text>}
FitseTLT marked this conversation as resolved.
Show resolved Hide resolved
{MCCIcon && !isThumbnail ? (
<Icon
src={MCCIcon}
height={receiptMCCSize}
Expand Down
18 changes: 13 additions & 5 deletions src/components/MoneyRequestConfirmationList.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ import ButtonWithDropdownMenu from './ButtonWithDropdownMenu';
import categoryPropTypes from './categoryPropTypes';
import ConfirmedRoute from './ConfirmedRoute';
import FormHelpMessage from './FormHelpMessage';
import Image from './Image';
import MenuItemWithTopDescription from './MenuItemWithTopDescription';
import optionPropTypes from './optionPropTypes';
import OptionsSelector from './OptionsSelector';
import ReceiptEmptyState from './ReceiptEmptyState';
import ReceiptImage from './ReceiptImage';
import SettlementButton from './SettlementButton';
import ShowMoreButton from './ShowMoreButton';
import Switch from './Switch';
Expand Down Expand Up @@ -579,8 +579,13 @@ function MoneyRequestConfirmationList(props) {
translate,
]);

const {image: receiptImage, thumbnail: receiptThumbnail} =
props.receiptPath && props.receiptFilename ? ReceiptUtils.getThumbnailAndImageURIs(transaction, props.receiptPath, props.receiptFilename) : {};
const {
image: receiptImage,
thumbnail: receiptThumbnail,
isThumbnail,
fileExtension,
} = props.receiptPath && props.receiptFilename ? ReceiptUtils.getThumbnailAndImageURIs(transaction, props.receiptPath, props.receiptFilename) : {};

return (
<OptionsSelector
sections={optionSelectorSections}
Expand All @@ -606,13 +611,16 @@ function MoneyRequestConfirmationList(props) {
</View>
)}
{receiptImage || receiptThumbnail ? (
<Image
<ReceiptImage
style={styles.moneyRequestImage}
source={{uri: receiptThumbnail || receiptImage}}
isThumbnail={isThumbnail}
source={receiptThumbnail || receiptImage}
// AuthToken is required when retrieving the image from the server
// but we don't need it to load the blob:// or file:// image when starting a money request / split bill
// So if we have a thumbnail, it means we're retrieving the image from the server
isAuthTokenRequired={!_.isEmpty(receiptThumbnail)}
fileExtension={fileExtension}
transactionID={props.transactionID || (props.transaction && props.transaction.transactionID)}
/>
) : (
// The empty receipt component should only show for IOU Requests of a paid policy ("Team" or "Corporate")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ import categoryPropTypes from './categoryPropTypes';
import ConfirmedRoute from './ConfirmedRoute';
import FormHelpMessage from './FormHelpMessage';
import * as Expensicons from './Icon/Expensicons';
import Image from './Image';
import MenuItemWithTopDescription from './MenuItemWithTopDescription';
import optionPropTypes from './optionPropTypes';
import OptionsSelector from './OptionsSelector';
import ReceiptEmptyState from './ReceiptEmptyState';
import ReceiptImage from './ReceiptImage';
import SettlementButton from './SettlementButton';
import Switch from './Switch';
import tagPropTypes from './tagPropTypes';
Expand Down Expand Up @@ -614,7 +614,12 @@ function MoneyTemporaryForRefactorRequestConfirmationList({
);
}, [isReadOnly, iouType, selectedParticipants.length, confirm, bankAccountRoute, iouCurrencyCode, policyID, splitOrRequestOptions, formError, styles.ph1, styles.mb2, translate]);

const {image: receiptImage, thumbnail: receiptThumbnail} = receiptPath && receiptFilename ? ReceiptUtils.getThumbnailAndImageURIs(transaction, receiptPath, receiptFilename) : {};
const {
image: receiptImage,
thumbnail: receiptThumbnail,
isThumbnail,
fileExtension,
} = receiptPath && receiptFilename ? ReceiptUtils.getThumbnailAndImageURIs(transaction, receiptPath, receiptFilename) : {};
return (
<OptionsSelector
sections={optionSelectorSections}
Expand All @@ -640,13 +645,16 @@ function MoneyTemporaryForRefactorRequestConfirmationList({
</View>
)}
{receiptImage || receiptThumbnail ? (
<Image
<ReceiptImage
style={styles.moneyRequestImage}
source={{uri: receiptThumbnail || receiptImage}}
isThumbnail={isThumbnail}
source={receiptThumbnail || receiptImage}
// AuthToken is required when retrieving the image from the server
// but we don't need it to load the blob:// or file:// image when starting a money request / split bill
// So if we have a thumbnail, it means we're retrieving the image from the server
isAuthTokenRequired={!_.isEmpty(receiptThumbnail)}
transactionID={transaction && transaction.transactionID}
fileExtension={fileExtension}
/>
) : (
// The empty receipt component should only show for IOU Requests of a paid policy ("Team" or "Corporate")
Expand Down
58 changes: 58 additions & 0 deletions src/components/ReceiptImage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import React from 'react';
import {View} from 'react-native';
import useThemeStyles from '@hooks/useThemeStyles';
import EReceiptThumbnail from './EReceiptThumbnail';
import Image from './Image';
import ThumbnailImage from './ThumbnailImage';

type Style = {height: number; borderRadius: number; margin: number};

type ReceiptImageProps = {
transactionID?: string;
FitseTLT marked this conversation as resolved.
Show resolved Hide resolved
FitseTLT marked this conversation as resolved.
Show resolved Hide resolved
isThumbnail?: boolean;
shouldUseThumnailImage?: boolean;
FitseTLT marked this conversation as resolved.
Show resolved Hide resolved
isEReceipt?: boolean;
source?: string;
isAuthTokenRequired?: boolean;
style?: Style;
fileExtension?: string;
};

function ReceiptImage({transactionID, isThumbnail = false, shouldUseThumnailImage = false, isEReceipt = false, source, isAuthTokenRequired, style, fileExtension}: ReceiptImageProps) {
FitseTLT marked this conversation as resolved.
Show resolved Hide resolved
const styles = useThemeStyles();

if (isEReceipt || isThumbnail) {
return (
<View style={style ?? [styles.w100, styles.h100]}>
<EReceiptThumbnail
transactionID={transactionID ?? ''}
borderRadius={style?.borderRadius}
fileExtension={fileExtension}
isThumbnail
/>
</View>
);
}

if (shouldUseThumnailImage) {
FitseTLT marked this conversation as resolved.
Show resolved Hide resolved
return (
<ThumbnailImage
previewSourceURL={source ?? ''}
style={[styles.w100, styles.h100]}
isAuthTokenRequired
shouldDynamicallyResize={false}
/>
);
}

return (
<Image
source={{uri: source}}
style={style ?? [styles.w100, styles.h100]}
isAuthTokenRequired={isAuthTokenRequired}
/>
);
}

export type {ReceiptImageProps};
export default ReceiptImage;
2 changes: 1 addition & 1 deletion src/components/ReportActionItem/MoneyRequestPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ function MoneyRequestPreview(props) {
merchantOrDescription = requestMerchant.replace(CONST.REGEX.FIRST_SPACE, translate('common.tbd'));
}

const receiptImages = hasReceipt ? [ReceiptUtils.getThumbnailAndImageURIs(props.transaction)] : [];
const receiptImages = hasReceipt ? [{...ReceiptUtils.getThumbnailAndImageURIs(props.transaction), transaction: props.transaction}] : [];

const getSettledMessage = () => {
if (isExpensifyCardTransaction) {
Expand Down
2 changes: 2 additions & 0 deletions src/components/ReportActionItem/MoneyRequestView.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ function MoneyRequestView({report, parentReport, parentReportActions, policyCate
<View style={styles.moneyRequestViewImage}>
<ReportActionItemImage
thumbnail={receiptURIs.thumbnail}
fileExtension={receiptURIs.fileExtension}
isThumbnail={receiptURIs.isThumbnail}
image={receiptURIs.image}
isLocalFile={receiptURIs.isLocalFile}
transaction={transaction}
Expand Down
59 changes: 28 additions & 31 deletions src/components/ReportActionItem/ReportActionItemImage.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
/* eslint-disable react/jsx-props-no-spreading */
import Str from 'expensify-common/lib/str';
import React from 'react';
import type {ReactElement} from 'react';
import {View} from 'react-native';
import AttachmentModal from '@components/AttachmentModal';
import EReceiptThumbnail from '@components/EReceiptThumbnail';
import Image from '@components/Image';
import PressableWithoutFocus from '@components/Pressable/PressableWithoutFocus';
import type {ReceiptImageProps} from '@components/ReceiptImage';
import ReceiptImage from '@components/ReceiptImage';
import {ShowContextMenuContext} from '@components/ShowContextMenuContext';
import ThumbnailImage from '@components/ThumbnailImage';
import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
import * as TransactionUtils from '@libs/TransactionUtils';
Expand All @@ -17,10 +15,16 @@ import type {Transaction} from '@src/types/onyx';

type ReportActionItemImageProps = {
/** thumbnail URI for the image */
thumbnail?: string | number;
thumbnail?: string;

/** The file type of the receipt */
fileExtension?: string;

/** whether or not we are going to display a thumbnail */
isThumbnail?: boolean;

/** URI for the image or local numeric reference for the image */
image: string | number;
image: string;

/** whether or not to enable the image preview modal */
enablePreviewModal?: boolean;
Expand All @@ -41,37 +45,30 @@ type ReportActionItemImageProps = {
* and optional preview modal as well.
*/

function ReportActionItemImage({thumbnail, image, enablePreviewModal = false, transaction, canEditReceipt = false, isLocalFile = false}: ReportActionItemImageProps) {
function ReportActionItemImage({
thumbnail,
isThumbnail,
image,
enablePreviewModal = false,
transaction,
canEditReceipt = false,
isLocalFile = false,
fileExtension,
}: ReportActionItemImageProps) {
const styles = useThemeStyles();
const {translate} = useLocalize();
const imageSource = tryResolveUrlFromApiRoot(image ?? '');
const thumbnailSource = tryResolveUrlFromApiRoot(thumbnail ?? '');
const isEReceipt = transaction && TransactionUtils.hasEReceipt(transaction);

let receiptImageComponent: ReactElement;
let propsObj: ReceiptImageProps;

if (isEReceipt) {
receiptImageComponent = (
<View style={[styles.w100, styles.h100]}>
<EReceiptThumbnail transactionID={transaction.transactionID} />
</View>
);
} else if (thumbnail && !isLocalFile && !Str.isPDF(imageSource as string)) {
receiptImageComponent = (
<ThumbnailImage
previewSourceURL={thumbnailSource}
style={[styles.w100, styles.h100]}
isAuthTokenRequired
shouldDynamicallyResize={false}
/>
);
propsObj = {isEReceipt: true, transactionID: transaction.transactionID};
} else if ((thumbnail ?? isThumbnail) && !isLocalFile && !Str.isPDF(imageSource)) {
propsObj = thumbnailSource ? {shouldUseThumnailImage: true, source: thumbnailSource} : {isThumbnail: true, fileExtension, transactionID: transaction?.transactionID};
FitseTLT marked this conversation as resolved.
Show resolved Hide resolved
} else {
receiptImageComponent = (
<Image
source={{uri: thumbnail ?? image}}
style={[styles.w100, styles.h100]}
/>
);
propsObj = {isThumbnail, fileExtension, transactionID: transaction?.transactionID, source: thumbnail ?? image};
}

if (enablePreviewModal) {
Expand All @@ -98,7 +95,7 @@ function ReportActionItemImage({thumbnail, image, enablePreviewModal = false, tr
accessibilityRole={CONST.ACCESSIBILITY_ROLE.IMAGEBUTTON}
accessibilityLabel={translate('accessibilityHints.viewAttachment')}
>
{receiptImageComponent}
<ReceiptImage {...propsObj} />
</PressableWithoutFocus>
)
}
Expand All @@ -108,7 +105,7 @@ function ReportActionItemImage({thumbnail, image, enablePreviewModal = false, tr
);
}

return receiptImageComponent;
return <ReceiptImage {...propsObj} />;
}

ReportActionItemImage.displayName = 'ReportActionItemImage';
Expand Down
15 changes: 5 additions & 10 deletions src/components/ReportActionItem/ReportActionItemImages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,13 @@ import Text from '@components/Text';
import useStyleUtils from '@hooks/useStyleUtils';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import type {ThumbnailAndImageURI} from '@libs/ReceiptUtils';
import variables from '@styles/variables';
import type {Transaction} from '@src/types/onyx';
import ReportActionItemImage from './ReportActionItemImage';

type Image = {
thumbnail: string | number;
image: string | number;
transaction: Transaction;
isLocalFile: boolean;
};

type ReportActionItemImagesProps = {
/** array of image and thumbnail URIs */
images: Image[];
images: ThumbnailAndImageURI[];

// We're not providing default values for size and total and disabling the ESLint rule
// because we want them to default to the length of images, but we can't set default props
Expand Down Expand Up @@ -71,7 +64,7 @@ function ReportActionItemImages({images, size, total, isHovered = false}: Report

return (
<View style={[styles.reportActionItemImages, hoverStyle, heightStyle]}>
{shownImages.map(({thumbnail, image, transaction, isLocalFile}, index) => {
{shownImages.map(({thumbnail, isThumbnail, image, transaction, isLocalFile, fileExtension}, index) => {
const isLastImage = index === numberOfShownImages - 1;

// Show a border to separate multiple images. Shown to the right for each except the last.
Expand All @@ -84,9 +77,11 @@ function ReportActionItemImages({images, size, total, isHovered = false}: Report
>
<ReportActionItemImage
thumbnail={thumbnail}
fileExtension={fileExtension}
image={image}
isLocalFile={isLocalFile}
transaction={transaction}
isThumbnail={isThumbnail}
/>
{isLastImage && remaining > 0 && (
<View style={[styles.reportActionItemImagesMoreContainer]}>
Expand Down
Loading
Loading