|
1 | 1 | import {useRoute} from '@react-navigation/native'; |
2 | 2 | import React from 'react'; |
3 | | -import type {StyleProp, ViewStyle} from 'react-native'; |
4 | | -import {View} from 'react-native'; |
| 3 | +import type {StyleProp, TextStyle} from 'react-native'; |
5 | 4 | import {useOnyx} from 'react-native-onyx'; |
6 | 5 | import useHover from '@hooks/useHover'; |
7 | 6 | import useLocalize from '@hooks/useLocalize'; |
@@ -33,7 +32,7 @@ type ParentNavigationSubtitleProps = { |
33 | 32 | parentReportActionID?: string; |
34 | 33 |
|
35 | 34 | /** PressableWithoutFeedback additional styles */ |
36 | | - pressableStyles?: StyleProp<ViewStyle>; |
| 35 | + pressableStyles?: StyleProp<TextStyle>; |
37 | 36 |
|
38 | 37 | /** Whether to open the parent report link in the current tab if possible */ |
39 | 38 | openParentReportInCurrentTab?: boolean; |
@@ -110,17 +109,15 @@ function ParentNavigationSubtitle({ |
110 | 109 | {!!reportName && ( |
111 | 110 | <> |
112 | 111 | <Text style={[styles.optionAlternateText, styles.textLabelSupporting]}>{`${translate('threads.from')} `}</Text> |
113 | | - <View style={pressableStyles}> |
114 | | - <TextLink |
115 | | - onMouseEnter={onMouseEnter} |
116 | | - onMouseLeave={onMouseLeave} |
117 | | - onPress={onPress} |
118 | | - accessibilityLabel={translate('threads.parentNavigationSummary', {reportName, workspaceName})} |
119 | | - style={[styles.optionAlternateText, styles.textLabelSupporting, hovered ? StyleUtils.getColorStyle(theme.linkHover) : styles.link]} |
120 | | - > |
121 | | - {reportName} |
122 | | - </TextLink> |
123 | | - </View> |
| 112 | + <TextLink |
| 113 | + onMouseEnter={onMouseEnter} |
| 114 | + onMouseLeave={onMouseLeave} |
| 115 | + onPress={onPress} |
| 116 | + accessibilityLabel={translate('threads.parentNavigationSummary', {reportName, workspaceName})} |
| 117 | + style={[pressableStyles, styles.optionAlternateText, styles.textLabelSupporting, hovered ? StyleUtils.getColorStyle(theme.linkHover) : styles.link]} |
| 118 | + > |
| 119 | + {reportName} |
| 120 | + </TextLink> |
124 | 121 | </> |
125 | 122 | )} |
126 | 123 | {!!workspaceName && workspaceName !== reportName && ( |
|
0 commit comments