a tool for shared writing and social publishing
0

Configure Feed

Select the types of activity you want to include in your feed.

fix profile loading behavior

Jared Pereira (May 25, 2026, 1:01 AM EDT) 895ddaca 5c5dff99

+5 -4
+5 -4
components/ProfilePopover.tsx
··· 18 18 let [isHovered, setIsHovered] = useState(false); 19 19 const hoverTimeout = useRef<null | number>(null); 20 20 21 + const shouldFetch = isHovered || isOpen; 21 22 const { data, isLoading } = useSWR( 22 - isHovered ? ["profile-data", props.didOrHandle] : null, 23 + shouldFetch ? ["profile-data", props.didOrHandle] : null, 23 24 async () => { 24 25 const response = await callRPC("get_profile_data", { 25 26 didOrHandle: props.didOrHandle, ··· 56 57 } 57 58 onOpenChange={setIsOpen} 58 59 > 59 - {isLoading ? ( 60 - <div className="text-secondary p-4">Loading...</div> 61 - ) : data?.profile ? ( 60 + {data?.profile ? ( 62 61 <div> 63 62 <ProfileHeader 64 63 profile={data.profile} ··· 68 67 69 68 <ProfileLinks handle={data.profile.handle} /> 70 69 </div> 70 + ) : isLoading || !data ? ( 71 + <div className="text-secondary p-4">Loading...</div> 71 72 ) : ( 72 73 <div className="text-secondary py-2 px-4">No profile found...</div> 73 74 )}