Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32385863
D8875.1765333330.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D8875.1765333330.diff
View Options
diff --git a/web/markdown/markdown-chat-mention.react.js b/web/markdown/markdown-chat-mention.react.js
--- a/web/markdown/markdown-chat-mention.react.js
+++ b/web/markdown/markdown-chat-mention.react.js
@@ -2,21 +2,30 @@
import * as React from 'react';
+import type { ResolvedThreadInfo } from 'lib/types/thread-types.js';
+
import css from './markdown.css';
+import { useOnClickThread } from '../selectors/thread-selectors.js';
type MarkdownChatMentionProps = {
+ +threadInfo: ResolvedThreadInfo,
+hasAccessToChat: boolean,
+text: string,
};
function MarkdownChatMention(props: MarkdownChatMentionProps): React.Node {
- const { hasAccessToChat, text } = props;
+ const { threadInfo, hasAccessToChat, text } = props;
+ const onClick = useOnClickThread(threadInfo);
if (!hasAccessToChat) {
return text;
}
- return <a className={css.chatMention}>{text}</a>;
+ return (
+ <a className={css.chatMention} onClick={onClick}>
+ {text}
+ </a>
+ );
}
export default MarkdownChatMention;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 10, 2:22 AM (21 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5859930
Default Alt Text
D8875.1765333330.diff (1 KB)
Attached To
Mode
D8875: [web] Make chat mentions clickable
Attached
Detach File
Event Timeline
Log In to Comment