[🐴] Disable hover card when blocked or blocking (#4041)

This commit is contained in:
Hailey
2024-05-16 08:17:34 -07:00
committed by GitHub
parent 9499d4343d
commit b635d000b5
4 changed files with 11 additions and 3 deletions
@@ -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 =