diff options
Diffstat (limited to 'src/components/ProfileHoverCard')
-rw-r--r-- | src/components/ProfileHoverCard/index.web.tsx | 6 | ||||
-rw-r--r-- | src/components/ProfileHoverCard/types.ts | 1 |
2 files changed, 6 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 = diff --git a/src/components/ProfileHoverCard/types.ts b/src/components/ProfileHoverCard/types.ts index a62279c96..2fa064383 100644 --- a/src/components/ProfileHoverCard/types.ts +++ b/src/components/ProfileHoverCard/types.ts @@ -4,4 +4,5 @@ export type ProfileHoverCardProps = { children: React.ReactElement did: string inline?: boolean + disable?: boolean } |