This commit is contained in:
Shusui MOYATANI
2023-03-27 00:53:19 +09:00
parent 567e1f8df8
commit 3e52a24f87
7 changed files with 60 additions and 25 deletions

View File

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