Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3735160
D9484.id31990.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D9484.id31990.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 10, 4:12 AM (1 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2844408
Default Alt Text
D9484.id31990.diff (1 KB)
Attached To
Mode
D9484: [web] make user profile accessible from user entity robotext
Attached
Detach File
Event Timeline
Log In to Comment