Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3518290
D13723.id45216.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D13723.id45216.diff
View Options
diff --git a/lib/hooks/fc-cache.js b/lib/hooks/fc-cache.js
--- a/lib/hooks/fc-cache.js
+++ b/lib/hooks/fc-cache.js
@@ -141,7 +141,7 @@
);
}
-function useFarcasterAvatarURL(fid: ?string): ?string {
+function useFarcasterUserAvatarURL(fid: ?string): ?string {
const neynarClientContext = React.useContext(NeynarClientContext);
const fcCache = neynarClientContext?.fcCache;
@@ -181,4 +181,4 @@
}, [fid, cachedAvatarURL, farcasterAvatarURL]);
}
-export { useFCNames, useFarcasterAvatarURL };
+export { useFCNames, useFarcasterUserAvatarURL };
diff --git a/lib/shared/avatar-utils.js b/lib/shared/avatar-utils.js
--- a/lib/shared/avatar-utils.js
+++ b/lib/shared/avatar-utils.js
@@ -9,7 +9,7 @@
import { threadOtherMembers } from './thread-utils.js';
import genesis from '../facts/genesis.js';
import { useENSAvatar } from '../hooks/ens-cache.js';
-import { useFarcasterAvatarURL } from '../hooks/fc-cache.js';
+import { useFarcasterUserAvatarURL } from '../hooks/fc-cache.js';
import type {
ClientAvatar,
ClientEmojiAvatar,
@@ -331,7 +331,7 @@
const ensAvatarURI = useENSAvatar(ethAddress);
const fid = usernameAndFID?.farcasterID;
- const farcasterAvatarURL = useFarcasterAvatarURL(fid);
+ const farcasterAvatarURL = useFarcasterUserAvatarURL(fid);
const resolvedAvatar = React.useMemo(() => {
if (userAvatarInfo.type !== 'ens' && userAvatarInfo.type !== 'farcaster') {
diff --git a/native/avatars/edit-user-avatar.react.js b/native/avatars/edit-user-avatar.react.js
--- a/native/avatars/edit-user-avatar.react.js
+++ b/native/avatars/edit-user-avatar.react.js
@@ -7,7 +7,7 @@
import { EditUserAvatarContext } from 'lib/components/edit-user-avatar-provider.react.js';
import { useENSAvatar } from 'lib/hooks/ens-cache.js';
-import { useFarcasterAvatarURL } from 'lib/hooks/fc-cache.js';
+import { useFarcasterUserAvatarURL } from 'lib/hooks/fc-cache.js';
import { getETHAddressForUserInfo } from 'lib/shared/account-utils.js';
import type { GenericUserInfoWithAvatar } from 'lib/types/avatar-types.js';
@@ -59,7 +59,7 @@
const ensAvatarURI = fetchedENSAvatarURI ?? props.prefetchedENSAvatarURI;
const fid = props.fid;
- const fetchedFarcasterAvatarURL = useFarcasterAvatarURL(fid);
+ const fetchedFarcasterAvatarURL = useFarcasterUserAvatarURL(fid);
const farcasterAvatarURL =
fetchedFarcasterAvatarURL ?? props.prefetchedFarcasterAvatarURL;
diff --git a/web/avatars/edit-user-avatar-menu.react.js b/web/avatars/edit-user-avatar-menu.react.js
--- a/web/avatars/edit-user-avatar-menu.react.js
+++ b/web/avatars/edit-user-avatar-menu.react.js
@@ -7,7 +7,7 @@
import { useModalContext } from 'lib/components/modal-provider.react.js';
import SWMansionIcon from 'lib/components/swmansion-icon.react.js';
import { useENSAvatar } from 'lib/hooks/ens-cache.js';
-import { useFarcasterAvatarURL } from 'lib/hooks/fc-cache.js';
+import { useFarcasterUserAvatarURL } from 'lib/hooks/fc-cache.js';
import { getETHAddressForUserInfo } from 'lib/shared/account-utils.js';
import { useCurrentUserFID } from 'lib/utils/farcaster-utils.js';
@@ -34,7 +34,7 @@
[currentUserInfo],
);
const ensAvatarURI: ?string = useENSAvatar(ethAddress);
- const farcasterAvatarURL = useFarcasterAvatarURL(currentUserFID);
+ const farcasterAvatarURL = useFarcasterUserAvatarURL(currentUserFID);
const editUserAvatarContext = React.useContext(EditUserAvatarContext);
invariant(editUserAvatarContext, 'editUserAvatarContext should be set');
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 23, 7:29 PM (18 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2696057
Default Alt Text
D13723.id45216.diff (3 KB)
Attached To
Mode
D13723: [lib] rename useFarcasterAvatarURL -> useFarcasterUserAvatarURL
Attached
Detach File
Event Timeline
Log In to Comment