Skip to content

Commit

Permalink
Merge pull request #20775 from robertKozik/20604-migrate-TaskPreview
Browse files Browse the repository at this point in the history
20604 — Migrate TaskPreview to PressableWithoutFeedback
  • Loading branch information
roryabraham authored Jun 16, 2023
2 parents d3afedb + b65a1c6 commit 83ab016
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/components/ReportActionItem/TaskPreview.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 compose from '../../libs/compose';
Expand All @@ -17,6 +17,7 @@ import ROUTES from '../../ROUTES';
import reportActionPropTypes from '../../pages/home/report/reportActionPropTypes';
import * as TaskUtils from '../../libs/actions/Task';
import RenderHTML from '../RenderHTML';
import PressableWithoutFeedback from '../Pressable/PressableWithoutFeedback';

const propTypes = {
/** The ID of the associated taskReport */
Expand Down Expand Up @@ -61,9 +62,11 @@ function TaskPreview(props) {
const htmlForTaskPreview = taskAssignee ? `<comment><mention-user>@${taskAssignee}</mention-user> ${taskTitle}</comment>` : `<comment>${taskTitle}</comment>`;

return (
<Pressable
<PressableWithoutFeedback
onPress={() => Navigation.navigate(ROUTES.getReportRoute(props.taskReportID))}
style={[styles.flexRow, styles.justifyContentBetween]}
accessibilityRole="button"
accessibilityLabel={props.translate('newTaskPage.task')}
>
<View style={[styles.flex1, styles.flexRow, styles.alignItemsCenter]}>
<Checkbox
Expand All @@ -85,7 +88,7 @@ function TaskPreview(props) {
src={Expensicons.ArrowRight}
fill={StyleUtils.getIconFillColor(getButtonState(props.isHovered))}
/>
</Pressable>
</PressableWithoutFeedback>
);
}

Expand Down

0 comments on commit 83ab016

Please sign in to comment.