about summary refs log tree commit diff
path: root/src/platform/urls.tsx
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2025-01-21 15:56:01 -0600
committerGitHub <noreply@github.com>2025-01-21 21:56:01 +0000
commit9df5caf3c545a7a1c559c6561625d99154aa0603 (patch)
tree3f7a1b2fdb6fb7628e22b79a978b762cccdd200e /src/platform/urls.tsx
parentc8d062f1aef130e13a99892e7bb695b1e123c3db (diff)
downloadvoidsky-9df5caf3c545a7a1c559c6561625d99154aa0603.tar.zst
Update hashtag menu to use `Menu`, convert to native link for additional a11y and click handling (#7529)
* Make tag a normal link on web

* Replace old TagMenu with new RichTextTag component, expand and improve click utils

* Clarify intents

* Ensure we're passing down hint

* ope

* DRY
Diffstat (limited to 'src/platform/urls.tsx')
-rw-r--r--src/platform/urls.tsx14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/platform/urls.tsx b/src/platform/urls.tsx
index fd9d297aa..514bde43e 100644
--- a/src/platform/urls.tsx
+++ b/src/platform/urls.tsx
@@ -1,4 +1,4 @@
-import {GestureResponderEvent, Linking} from 'react-native'
+import {Linking} from 'react-native'
 
 import {isNative, isWeb} from './detection'
 
@@ -24,15 +24,3 @@ export function clearHash() {
     window.location.hash = ''
   }
 }
-
-export function shouldClickOpenNewTab(e: GestureResponderEvent) {
-  /**
-   * A `GestureResponderEvent`, but cast to `any` to avoid using a bunch
-   * of @ts-ignore below.
-   */
-  const event = e as any
-  const isMiddleClick = isWeb && event.button === 1
-  const isMetaKey =
-    isWeb && (event.metaKey || event.altKey || event.ctrlKey || event.shiftKey)
-  return isMetaKey || isMiddleClick
-}