diff --git a/ui/shared/entities/address/IdenticonUniversalProfileQuery.tsx b/ui/shared/entities/address/IdenticonUniversalProfileQuery.tsx index 6f798ae2c8..5d2071d497 100644 --- a/ui/shared/entities/address/IdenticonUniversalProfileQuery.tsx +++ b/ui/shared/entities/address/IdenticonUniversalProfileQuery.tsx @@ -18,12 +18,16 @@ export const formattedLuksoName = (hash: string, name: string | null) => { }; // eslint-disable-next-line @typescript-eslint/no-explicit-any -export const useUniversalProfile = (address: string): UseQueryResult => { +export const useUniversalProfile = (address: string): UseQueryResult => { return useQuery({ + refetchOnWindowFocus: false, + refetchOnReconnect: false, + retryOnMount: false, + staleTime: Infinity, queryKey: [ 'universalProfile', { address } ], queryFn: async() => { if (!isUniversalProfileEnabled()) { - return {}; + return null; } const upApiUrl = getEnvValue('NEXT_PUBLIC_UNIVERSAL_PROFILES_API_URL') || ''; @@ -35,7 +39,7 @@ export const useUniversalProfile = (address: string): UseQueryResult => { const json = await resp.json(); return json as UniversalProfileProxyResponse; } catch (err) { - return undefined; + return null; } }, });