about summary refs log tree commit diff
path: root/src/view/com/util/Link.tsx
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-10-30 17:45:07 -0700
committerPaul Frazee <pfrazee@gmail.com>2023-10-30 17:45:07 -0700
commite18e7ce34a1554f23826cdec510bf217bbedee43 (patch)
tree2cfeceb31d2c98b104ca616a2d2579793d612818 /src/view/com/util/Link.tsx
parente1dcedd87e104ab38baf29420ddcb940cab83711 (diff)
parent9826e7c7b99b16d77534473d822642c7cbf1f3fe (diff)
downloadvoidsky-e18e7ce34a1554f23826cdec510bf217bbedee43.tar.zst
Merge branch 'liby-bugfix/desktop-web-text-link-media-query-issue' into main
Diffstat (limited to 'src/view/com/util/Link.tsx')
-rw-r--r--src/view/com/util/Link.tsx13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/view/com/util/Link.tsx b/src/view/com/util/Link.tsx
index 35524bcc6..1777f6659 100644
--- a/src/view/com/util/Link.tsx
+++ b/src/view/com/util/Link.tsx
@@ -27,11 +27,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<HTMLAnchorElement, MouseEvent>
@@ -222,7 +221,7 @@ export const TextLink = memo(function TextLink({
 /**
  * Only acts as a link on desktop web
  */
-interface DesktopWebTextLinkProps extends TextProps {
+interface TextLinkOnWebOnlyProps extends TextProps {
   testID?: string
   type?: TypographyVariant
   style?: StyleProp<TextStyle>
@@ -235,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,
@@ -244,10 +243,8 @@ export const DesktopWebTextLink = memo(function DesktopWebTextLink({
   numberOfLines,
   lineHeight,
   ...props
-}: DesktopWebTextLinkProps) {
-  const {isDesktop} = useWebMediaQueries()
-
-  if (isDesktop) {
+}: TextLinkOnWebOnlyProps) {
+  if (isWeb) {
     return (
       <TextLink
         testID={testID}