Skip to content

Commit

Permalink
migrate ReportPreview to PressableWithoutFeedback
Browse files Browse the repository at this point in the history
  • Loading branch information
robertKozik committed Jun 13, 2023
1 parent 93957f0 commit 529d4a7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/components/ReportActionItem/ReportPreview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import {View, Pressable} from 'react-native';
import {View} from 'react-native';
import PropTypes from 'prop-types';
import {withOnyx} from 'react-native-onyx';
import lodashGet from 'lodash/get';
Expand All @@ -25,6 +25,7 @@ import themeColors from '../../styles/themes/default';
import getButtonState from '../../libs/getButtonState';
import * as IOU from '../../libs/actions/IOU';
import refPropTypes from '../refPropTypes';
import PressableWithoutFeedback from '../Pressable/PressableWithoutFeedback';

const propTypes = {
/** All the data of the action */
Expand Down Expand Up @@ -103,7 +104,7 @@ const ReportPreview = (props) => {
return (
<View style={[styles.chatItemMessage]}>
{_.map(props.action.message, (message, index) => (
<Pressable
<PressableWithoutFeedback
key={`ReportPreview-${props.action.reportActionID}-${index}`}
onPress={() => {
Navigation.navigate(ROUTES.getReportRoute(props.iouReportID));
Expand All @@ -112,7 +113,8 @@ const ReportPreview = (props) => {
onPressOut={() => ControlSelection.unblock()}
onLongPress={(event) => showContextMenuForReport(event, props.contextMenuAnchor, props.chatReportID, props.action, props.checkIfContextMenuActive)}
style={[styles.flexRow, styles.justifyContentBetween]}
focusable
accessibilityRole="button"
accessibilityLabel={props.translate('iou.viewDetails')}
>
<View style={[styles.flexShrink1]}>
{props.iouReport.hasOutstandingIOU ? (
Expand Down Expand Up @@ -140,7 +142,7 @@ const ReportPreview = (props) => {
src={Expensicons.ArrowRight}
fill={StyleUtils.getIconFillColor(getButtonState(props.isHovered))}
/>
</Pressable>
</PressableWithoutFeedback>
))}
{isCurrentUserManager && !ReportUtils.isSettled(props.iouReport.reportID) && (
<SettlementButton
Expand Down

0 comments on commit 529d4a7

Please sign in to comment.