diff --git a/web/chat/composed-message.react.js b/web/chat/composed-message.react.js --- a/web/chat/composed-message.react.js +++ b/web/chat/composed-message.react.js @@ -240,7 +240,9 @@ const shouldShowUsername = !isViewer && item.startsCluster; const stringForUser = useStringForUser(shouldShowUsername ? creator : null); - const pushUserProfileModal = usePushUserProfileModal(creator.id); + const pushUserProfileModal = usePushUserProfileModal({ + userID: creator.id, + }); return ( {usernameText}; } diff --git a/web/markdown/markdown-user-mention.react.js b/web/markdown/markdown-user-mention.react.js --- a/web/markdown/markdown-user-mention.react.js +++ b/web/markdown/markdown-user-mention.react.js @@ -13,7 +13,7 @@ function MarkdownUserMention(props: MarkdownChatMentionProps): React.Node { const { text, userID } = props; - const pushUserProfileModal = usePushUserProfileModal(userID); + const pushUserProfileModal = usePushUserProfileModal({ userID }); return ( diff --git a/web/modals/chat/message-reactions-list-item.react.js b/web/modals/chat/message-reactions-list-item.react.js --- a/web/modals/chat/message-reactions-list-item.react.js +++ b/web/modals/chat/message-reactions-list-item.react.js @@ -15,7 +15,9 @@ function MessageReactionsListItem(props: Props): React.Node { const { messageReactionUser } = props; - const pushUserProfileModal = usePushUserProfileModal(messageReactionUser.id); + const pushUserProfileModal = usePushUserProfileModal({ + userID: messageReactionUser.id, + }); return (
diff --git a/web/modals/threads/members/member.react.js b/web/modals/threads/members/member.react.js --- a/web/modals/threads/members/member.react.js +++ b/web/modals/threads/members/member.react.js @@ -116,7 +116,9 @@ [roleName], ); - const pushUserProfileModal = usePushUserProfileModal(memberInfo.id); + const pushUserProfileModal = usePushUserProfileModal({ + userID: memberInfo.id, + }); return (
diff --git a/web/modals/user-profile/user-profile-utils.js b/web/modals/user-profile/user-profile-utils.js --- a/web/modals/user-profile/user-profile-utils.js +++ b/web/modals/user-profile/user-profile-utils.js @@ -6,7 +6,13 @@ import UserProfileModal from './user-profile-modal.react.js'; -function usePushUserProfileModal(userID: string): () => mixed { +type Props = { + +userID: string, +}; + +function usePushUserProfileModal(props: Props): () => mixed { + const { userID } = props; + const { pushModal } = useModalContext(); return React.useCallback(() => { diff --git a/web/settings/relationship/block-list-row.react.js b/web/settings/relationship/block-list-row.react.js --- a/web/settings/relationship/block-list-row.react.js +++ b/web/settings/relationship/block-list-row.react.js @@ -17,7 +17,7 @@ const { unblockUser } = useRelationshipCallbacks(userInfo.id); const editIcon = ; - const pushUserProfileModal = usePushUserProfileModal(userInfo.id); + const pushUserProfileModal = usePushUserProfileModal({ userID: userInfo.id }); return (
diff --git a/web/settings/relationship/friend-list-row.react.js b/web/settings/relationship/friend-list-row.react.js --- a/web/settings/relationship/friend-list-row.react.js +++ b/web/settings/relationship/friend-list-row.react.js @@ -102,7 +102,7 @@ unfriendUser, ]); - const pushUserProfileModal = usePushUserProfileModal(userInfo.id); + const pushUserProfileModal = usePushUserProfileModal({ userID: userInfo.id }); return (