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,29 @@ +// @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; + + const userProfileActionButtons = React.useMemo( + () => ( +
+ +
+ ), + [threadInfo], + ); + + return userProfileActionButtons; +} + +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 ( - + ); }, [userInfo?.relationshipStatus, userProfileThreadInfo]); @@ -71,11 +71,11 @@ -
{messageButton}
+ {actionButtons} ), [ - messageButton, + actionButtons, onClickCopyUsername, userInfo?.id, usernameCopied,