HomePhabricator
Diffusion Comm 0ce88c17f8a0

[lib] Introduce useENSAvatar hook

Description

[lib] Introduce useENSAvatar hook

Summary:
More context in the discussion under ENG-3302. We decided to make this a hook to separate fetching and rendering concerns.

This is mostly modelled after useENSNames, except that we only need to handle one fetch at a time in this hook.

Test Plan: I tested with this patch, which uses an ENS name that points to an NFT in the user's wallet that is an SVG data URI: https://gist.github.com/Ashoat/461523a089b78554ce3a36dcf3115661

Reviewers: ginsu, atul

Reviewed By: ginsu

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D7165

Details

Provenance
ashoatAuthored on Mar 23 2023, 8:53 PM
Reviewer
ginsu
Differential Revision
D7165: [lib] Introduce useENSAvatar hook
Parents
rCOMM112846eaebdd: [lib] introduce useGetAvatarForThread hook
Branches
Unknown
Tags
Unknown