mirror of
https://github.com/aljazceru/rabbit.git
synced 2025-12-19 06:54:23 +01:00
update
This commit is contained in:
@@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user