From d0bb97e8a9e9ae5e36c85dcb292616e60558a921 Mon Sep 17 00:00:00 2001 From: Hailey Date: Sun, 16 Jun 2024 02:23:48 -0700 Subject: fix native post meta (#4530) --- src/components/ProfileHoverCard/index.web.tsx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/components/ProfileHoverCard/index.web.tsx') diff --git a/src/components/ProfileHoverCard/index.web.tsx b/src/components/ProfileHoverCard/index.web.tsx index e17977af4..4f110485e 100644 --- a/src/components/ProfileHoverCard/index.web.tsx +++ b/src/components/ProfileHoverCard/index.web.tsx @@ -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 + return ( + + + + ) } } -- cgit 1.4.1