about summary refs log tree commit diff
path: root/src/components/ProfileHoverCard/index.web.tsx
diff options
context:
space:
mode:
authorHailey <me@haileyok.com>2024-05-16 08:17:34 -0700
committerGitHub <noreply@github.com>2024-05-16 08:17:34 -0700
commitb635d000b51a440b3c0eb8a2c0c01cf8e8c54ed3 (patch)
treef69e4d059c698479ad9fb1f4b80ee8490e91fd1b /src/components/ProfileHoverCard/index.web.tsx
parent9499d4343db3107ef97243894d7310e3de3daa60 (diff)
downloadvoidsky-b635d000b51a440b3c0eb8a2c0c01cf8e8c54ed3.tar.zst
[🐴] Disable hover card when blocked or blocking (#4041)
Diffstat (limited to 'src/components/ProfileHoverCard/index.web.tsx')
-rw-r--r--src/components/ProfileHoverCard/index.web.tsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/components/ProfileHoverCard/index.web.tsx b/src/components/ProfileHoverCard/index.web.tsx
index 09a4b397b..60b83e110 100644
--- a/src/components/ProfileHoverCard/index.web.tsx
+++ b/src/components/ProfileHoverCard/index.web.tsx
@@ -46,7 +46,11 @@ const floatingMiddlewares = [
 const isTouchDevice = 'ontouchstart' in window || navigator.maxTouchPoints > 0
 
 export function ProfileHoverCard(props: ProfileHoverCardProps) {
-  return isTouchDevice ? props.children : <ProfileHoverCardInner {...props} />
+  if (props.disable || isTouchDevice) {
+    return props.children
+  } else {
+    return <ProfileHoverCardInner {...props} />
+  }
 }
 
 type State =