diff --git a/src/view/com/util/Link.tsx b/src/view/com/util/Link.tsx index 6915d3e08..472d943e1 100644 --- a/src/view/com/util/Link.tsx +++ b/src/view/com/util/Link.tsx @@ -28,11 +28,10 @@ import { isExternalUrl, linkRequiresWarning, } from 'lib/strings/url-helpers' -import {isAndroid} from 'platform/detection' +import {isAndroid, isWeb} from 'platform/detection' import {sanitizeUrl} from '@braintree/sanitize-url' import {PressableWithHover} from './PressableWithHover' import FixedTouchableHighlight from '../pager/FixedTouchableHighlight' -import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries' type Event = | React.MouseEvent @@ -246,9 +245,7 @@ export const DesktopWebTextLink = observer(function DesktopWebTextLink({ lineHeight, ...props }: DesktopWebTextLinkProps) { - const {isDesktop} = useWebMediaQueries() - - if (isDesktop) { + if (isWeb) { return ( Date: Mon, 30 Oct 2023 17:44:58 -0700 Subject: [PATCH 2/2] Rename component to match new behavior --- src/view/com/posts/FeedItem.tsx | 6 +++--- src/view/com/util/Link.tsx | 6 +++--- src/view/com/util/PostMeta.tsx | 6 +++--- src/view/com/util/UserInfoText.tsx | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/view/com/posts/FeedItem.tsx b/src/view/com/posts/FeedItem.tsx index 1ceae80ae..6aac450ff 100644 --- a/src/view/com/posts/FeedItem.tsx +++ b/src/view/com/posts/FeedItem.tsx @@ -9,7 +9,7 @@ import { } from '@fortawesome/react-native-fontawesome' import {PostsFeedItemModel} from 'state/models/feeds/post' import {FeedSourceInfo} from 'lib/api/feed/types' -import {Link, DesktopWebTextLink} from '../util/Link' +import {Link, TextLinkOnWebOnly} from '../util/Link' import {Text} from '../util/text/Text' import {UserInfoText} from '../util/UserInfoText' import {PostMeta} from '../util/PostMeta' @@ -189,7 +189,7 @@ export const FeedItem = observer(function FeedItemImpl({ lineHeight={1.2} numberOfLines={1}> From{' '} - Reposted by{' '} - @@ -234,7 +234,7 @@ interface DesktopWebTextLinkProps extends TextProps { accessibilityHint?: string title?: string } -export const DesktopWebTextLink = memo(function DesktopWebTextLink({ +export const TextLinkOnWebOnly = memo(function DesktopWebTextLink({ testID, type = 'md', style, @@ -243,7 +243,7 @@ export const DesktopWebTextLink = memo(function DesktopWebTextLink({ numberOfLines, lineHeight, ...props -}: DesktopWebTextLinkProps) { +}: TextLinkOnWebOnlyProps) { if (isWeb) { return ( )} - {({timeElapsed}) => ( -