[🐴] Disable hover card when blocked or blocking (#4041)
This commit is contained in:
@@ -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 =
|
||||
|
||||
@@ -4,4 +4,5 @@ export type ProfileHoverCardProps = {
|
||||
children: React.ReactElement
|
||||
did: string
|
||||
inline?: boolean
|
||||
disable?: boolean
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user