This commit is contained in:
Shusui MOYATANI
2023-03-22 02:36:04 +09:00
parent db289c5276
commit 4e165bc879
21 changed files with 463 additions and 112 deletions

View File

@@ -1,15 +1,21 @@
import type { MentionedUser } from '@/core/parseTextNote';
import GeneralUserMentionDisplay from '@/components/textNote/GeneralUserMentionDisplay';
import useModalState from '@/hooks/useModalState';
export type MentionedUserDisplayProps = {
mentionedUser: MentionedUser;
};
const MentionedUserDisplay = (props: MentionedUserDisplayProps) => {
const { showProfile } = useModalState();
const handleClick = () => {
showProfile(props.mentionedUser.pubkey);
};
return (
<span class="text-blue-500 underline">
<button class="inline text-blue-500 underline" onClick={handleClick}>
<GeneralUserMentionDisplay pubkey={props.mentionedUser.pubkey} />
</span>
</button>
);
};