Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type {View} from 'react-native';
import {getButtonRole} from '@components/Button/utils';
import OfflineWithFeedback from '@components/OfflineWithFeedback';
import PressableWithFeedback from '@components/Pressable/PressableWithFeedback';
import type {TransactionListItemType} from '@components/Search/SearchList/ListItem/types';
import UserInfoAndActionButtonRow from '@components/Search/SearchList/ListItem/UserInfoAndActionButtonRow';
import type {ListItem} from '@components/SelectionList/types';
import TransactionItemRow from '@components/TransactionItemRow';
Expand All @@ -16,7 +17,6 @@ import type {TransactionListItemNarrowProps} from './types';

function TransactionListItemNarrow<TItem extends ListItem>({
item,
transactionItem,
isDeletedTransaction,
isFocused,
showTooltip,
Expand Down Expand Up @@ -61,6 +61,8 @@ function TransactionListItemNarrow<TItem extends ListItem>({
const pressableRef = useRef<View>(null);
useSyncFocus(pressableRef, !!isFocused, shouldSyncFocus);

const transactionItem = item as unknown as TransactionListItemType;

const pressableStyle = [
Comment thread
TMisiukiewicz marked this conversation as resolved.
styles.transactionListItemStyle,
styles.p4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type {View} from 'react-native';
import {getButtonRole} from '@components/Button/utils';
import OfflineWithFeedback from '@components/OfflineWithFeedback';
import PressableWithFeedback from '@components/Pressable/PressableWithFeedback';
import type {TransactionListItemType} from '@components/Search/SearchList/ListItem/types';
import type {ListItem} from '@components/SelectionList/types';
import TransactionItemRow from '@components/TransactionItemRow';
import useAnimatedHighlightStyle from '@hooks/useAnimatedHighlightStyle';
Expand All @@ -15,7 +16,6 @@ import type {TransactionListItemWideProps} from './types';

function TransactionListItemWide<TItem extends ListItem>({
item,
transactionItem,
isDeletedTransaction,
isFocused,
showTooltip,
Expand Down Expand Up @@ -59,6 +59,8 @@ function TransactionListItemWide<TItem extends ListItem>({
const pressableRef = useRef<View>(null);
useSyncFocus(pressableRef, !!isFocused, shouldSyncFocus);

const transactionItem = item as unknown as TransactionListItemType;

const amountColumnSize = transactionItem.isAmountColumnWide ? CONST.SEARCH.TABLE_COLUMN_SIZES.WIDE : CONST.SEARCH.TABLE_COLUMN_SIZES.NORMAL;
const taxAmountColumnSize = transactionItem.isTaxAmountColumnWide ? CONST.SEARCH.TABLE_COLUMN_SIZES.WIDE : CONST.SEARCH.TABLE_COLUMN_SIZES.NORMAL;
Comment thread
TMisiukiewicz marked this conversation as resolved.
const dateColumnSize = transactionItem.shouldShowYear ? CONST.SEARCH.TABLE_COLUMN_SIZES.WIDE : CONST.SEARCH.TABLE_COLUMN_SIZES.NORMAL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ function TransactionListItem<TItem extends ListItem>({

const sharedProps = {
item,
Comment thread
TMisiukiewicz marked this conversation as resolved.
transactionItem,
isDeletedTransaction,
isFocused,
showTooltip,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type {MouseEvent} from 'react';
import type {TransactionListItemType} from '@components/Search/SearchList/ListItem/types';
import type {SearchColumnType} from '@components/Search/types';
import type {ListItemFocusEventHandler} from '@components/SelectionList/ListItem/types';
import type {ListItem} from '@components/SelectionList/types';
Expand Down Expand Up @@ -27,7 +26,6 @@ type TransactionListItemInlineEditProps = {

type TransactionListItemWideProps<TItem extends ListItem> = {
item: TItem;
transactionItem: TransactionListItemType;
isDeletedTransaction: boolean;
isFocused?: boolean;
showTooltip: boolean;
Comment thread
TMisiukiewicz marked this conversation as resolved.
Expand Down
Loading