Skip to content

Commit

Permalink
fix log calls
Browse files Browse the repository at this point in the history
  • Loading branch information
luacmartins committed Sep 18, 2024
1 parent 934821f commit 2973264
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/components/SelectionList/Search/TransactionListItemRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,13 @@ function ReceiptCell({transactionItem}: TransactionCellProps) {

const backgroundStyles = transactionItem.isSelected ? StyleUtils.getBackgroundColorStyle(theme.buttonHoveredBG) : StyleUtils.getBackgroundColorStyle(theme.border);

const filename = getFileName(transactionItem?.receipt?.source ?? '');
const receiptURIs = getThumbnailAndImageURIs(transactionItem, null, filename);
const isReceiptPDF = Str.isPDF(filename);
const source = tryResolveUrlFromApiRoot(isReceiptPDF && !receiptURIs.isLocalFile ? receiptURIs.thumbnail ?? '' : receiptURIs.image ?? '');
let source = transactionItem?.receipt?.source ?? '';
if (source) {
const filename = getFileName(transactionItem?.receipt?.source ?? '');
const receiptURIs = getThumbnailAndImageURIs(transactionItem, null, filename);
const isReceiptPDF = Str.isPDF(filename);
source = tryResolveUrlFromApiRoot(isReceiptPDF && !receiptURIs.isLocalFile ? receiptURIs.thumbnail ?? '' : receiptURIs.image ?? '');
}

return (
<View
Expand Down

0 comments on commit 2973264

Please sign in to comment.