Skip to content

Commit

Permalink
Remove on mount refetching profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
samchuk-vlad committed Jun 11, 2024
1 parent 03f0d78 commit eb0d528
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/components/AddressAvatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ const AddressAvatar = forwardRef<HTMLDivElement, AddressAvatarProps>(
const [isAvatarError, setIsAvatarError] = useState(false)
const onImageError = useCallback(() => setIsAvatarError(true), [])

const { data: profile, isLoading } = getProfileQuery.useQuery(address, {
refetchOnMount: 'always',
})
const { data: profile, isLoading } = getProfileQuery.useQuery(address)

const profileSource = profile?.profileSpace?.content?.profileSource
const subsocialProfileImage = profile?.profileSpace?.content?.image
Expand Down
2 changes: 1 addition & 1 deletion src/components/Name.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ LinkOrText.displayName = 'LinkOrText'

export function useName(address: string) {
const { data: profile, isLoading: isLoadingProfile } =
getProfileQuery.useQuery(address, { refetchOnMount: 'always' })
getProfileQuery.useQuery(address)
const textColor = useRandomColor(address)

let name = generateRandomName(address)
Expand Down

0 comments on commit eb0d528

Please sign in to comment.