diff --git a/web/avatars/thread-avatar.react.js b/web/avatars/thread-avatar.react.js
index f6258e407..1bcfd82c1 100644
--- a/web/avatars/thread-avatar.react.js
+++ b/web/avatars/thread-avatar.react.js
@@ -1,48 +1,55 @@
// @flow
import * as React from 'react';
import {
useAvatarForThread,
useENSResolvedAvatar,
} from 'lib/shared/avatar-utils.js';
import { getSingleOtherUser } from 'lib/shared/thread-utils.js';
import { threadTypes } from 'lib/types/thread-types-enum.js';
import { type RawThreadInfo, type ThreadInfo } from 'lib/types/thread-types.js';
import Avatar from './avatar.react.js';
import { useSelector } from '../redux/redux-utils.js';
type Props = {
+threadInfo: RawThreadInfo | ThreadInfo,
+size: 'micro' | 'small' | 'large' | 'profile',
+ +showSpinner?: boolean,
};
function ThreadAvatar(props: Props): React.Node {
- const { threadInfo, size } = props;
+ const { threadInfo, size, showSpinner } = props;
const avatarInfo = useAvatarForThread(threadInfo);
const viewerID = useSelector(
state => state.currentUserInfo && state.currentUserInfo.id,
);
let displayUserIDForThread;
if (threadInfo.type === threadTypes.PRIVATE) {
displayUserIDForThread = viewerID;
} else if (threadInfo.type === threadTypes.PERSONAL) {
displayUserIDForThread = getSingleOtherUser(threadInfo, viewerID);
}
const displayUser = useSelector(state =>
displayUserIDForThread
? state.userStore.userInfos[displayUserIDForThread]
: null,
);
const resolvedThreadAvatar = useENSResolvedAvatar(avatarInfo, displayUser);
- return ;
+ return (
+
+ );
}
export default ThreadAvatar;