Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3756839
D9506.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D9506.diff
View Options
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 (
<ComposedMessage
diff --git a/web/chat/robotext-message.react.js b/web/chat/robotext-message.react.js
--- a/web/chat/robotext-message.react.js
+++ b/web/chat/robotext-message.react.js
@@ -147,7 +147,7 @@
function UserEntity(props: UserEntityProps) {
const { userID, usernameText } = props;
- const pushUserProfileModal = usePushUserProfileModal(userID);
+ const pushUserProfileModal = usePushUserProfileModal({ userID });
return <a onClick={pushUserProfileModal}>{usernameText}</a>;
}
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 (
<a className={css.mention} onClick={pushUserProfileModal}>
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 (
<div className={css.userRowContainer} onClick={pushUserProfileModal}>
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 (
<div className={css.memberContainer} onClick={pushUserProfileModal}>
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 = <SWMansionIcon icon="edit-1" size={22} />;
- const pushUserProfileModal = usePushUserProfileModal(userInfo.id);
+ const pushUserProfileModal = usePushUserProfileModal({ userID: userInfo.id });
return (
<div className={css.container} onClick={pushUserProfileModal}>
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 (
<div className={css.container} onClick={pushUserProfileModal}>
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 11, 6:08 AM (20 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2860764
Default Alt Text
D9506.diff (4 KB)
Attached To
Mode
D9506: [web] update usePushUserProfileModal hook args
Attached
Detach File
Event Timeline
Log In to Comment