fix native post meta (#4530)
This commit is contained in:
parent
eaef1446f2
commit
d0bb97e8a9
2 changed files with 45 additions and 47 deletions
|
@ -51,10 +51,23 @@ const floatingMiddlewares = [
|
|||
]
|
||||
|
||||
export function ProfileHoverCard(props: ProfileHoverCardProps) {
|
||||
const prefetchProfileQuery = usePrefetchProfileQuery()
|
||||
const prefetchedProfile = React.useRef(false)
|
||||
const onPointerMove = () => {
|
||||
if (!prefetchedProfile.current) {
|
||||
prefetchedProfile.current = true
|
||||
prefetchProfileQuery(props.did)
|
||||
}
|
||||
}
|
||||
|
||||
if (props.disable || isTouchDevice) {
|
||||
return props.children
|
||||
} else {
|
||||
return <ProfileHoverCardInner {...props} />
|
||||
return (
|
||||
<View onPointerMove={onPointerMove}>
|
||||
<ProfileHoverCardInner {...props} />
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue