Page MenuHomePhabricator

D9431.id31818.diff
No OneTemporary

D9431.id31818.diff

diff --git a/web/modals/user-profile/user-profile-action-buttons.react.js b/web/modals/user-profile/user-profile-action-buttons.react.js
new file mode 100644
--- /dev/null
+++ b/web/modals/user-profile/user-profile-action-buttons.react.js
@@ -0,0 +1,24 @@
+// @flow
+
+import * as React from 'react';
+
+import type { ThreadInfo } from 'lib/types/thread-types';
+
+import UserProfileMessageButton from './user-profile-message-button.react.js';
+import css from './user-profile.css';
+
+type Props = {
+ +threadInfo: ThreadInfo,
+};
+
+function UserProfileActionButtons(props: Props): React.Node {
+ const { threadInfo } = props;
+
+ return (
+ <div className={css.buttonsContainer}>
+ <UserProfileMessageButton threadInfo={threadInfo} />
+ </div>
+ );
+}
+
+export default UserProfileActionButtons;
diff --git a/web/modals/user-profile/user-profile.react.js b/web/modals/user-profile/user-profile.react.js
--- a/web/modals/user-profile/user-profile.react.js
+++ b/web/modals/user-profile/user-profile.react.js
@@ -9,7 +9,7 @@
import type { UserInfo } from 'lib/types/user-types';
import sleep from 'lib/utils/sleep.js';
-import UserProfileMessageButton from './user-profile-message-button.react.js';
+import UserProfileActionButtons from './user-profile-action-buttons.react.js';
import css from './user-profile.css';
import UserAvatar from '../../avatars/user-avatar.react.js';
@@ -37,7 +37,7 @@
setUsernameCopied(false);
}, [usernameCopied, usernameText]);
- const messageButton = React.useMemo(() => {
+ const actionButtons = React.useMemo(() => {
if (
!userProfileThreadInfo ||
relationshipBlockedInEitherDirection(userInfo?.relationshipStatus)
@@ -46,7 +46,7 @@
}
return (
- <UserProfileMessageButton threadInfo={userProfileThreadInfo.threadInfo} />
+ <UserProfileActionButtons threadInfo={userProfileThreadInfo.threadInfo} />
);
}, [userInfo?.relationshipStatus, userProfileThreadInfo]);
@@ -70,7 +70,7 @@
</div>
</div>
</div>
- <div className={css.buttonsContainer}>{messageButton}</div>
+ {actionButtons}
</div>
);
}

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 24, 11:24 AM (2 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2698054
Default Alt Text
D9431.id31818.diff (2 KB)

Event Timeline