Page MenuHomePhabricator

D9484.id32098.diff
No OneTemporary

D9484.id32098.diff

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
@@ -17,6 +17,7 @@
import css from './robotext-message.css';
import Markdown from '../markdown/markdown.react.js';
import { linkRules } from '../markdown/rules.react.js';
+import { usePushUserProfileModal } from '../modals/user-profile/user-profile-utils.js';
import { updateNavInfoActionType } from '../redux/action-types.js';
import { useSelector } from '../redux/redux-utils.js';
import { useMessageTooltip } from '../utils/tooltip-action-utils.js';
@@ -142,13 +143,13 @@
userID: string,
usernameText: string,
};
-// Since entityTextToReact lives in lib I created this dummy UserEntity
-// component for web that will be used temporarily to appease flow
-// https://phab.comm.dev/D9389
+
function UserEntity(props: UserEntityProps) {
- const { usernameText } = props;
+ const { userID, usernameText } = props;
+
+ const pushUserProfileModal = usePushUserProfileModal(userID);
- return usernameText;
+ return <a onClick={pushUserProfileModal}>{usernameText}</a>;
}
function ColorEntity(props: { color: string }) {

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 10, 3:38 AM (1 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2844408
Default Alt Text
D9484.id32098.diff (1 KB)

Event Timeline