mirror of
https://github.com/aljazceru/rabbit.git
synced 2025-12-18 14:34:25 +01:00
24 lines
648 B
TypeScript
24 lines
648 B
TypeScript
import GeneralUserMentionDisplay from '@/components/textNote/GeneralUserMentionDisplay';
|
|
import useModalState from '@/hooks/useModalState';
|
|
|
|
import type { MentionedUser } from '@/nostr/parseTextNote';
|
|
|
|
export type MentionedUserDisplayProps = {
|
|
pubkey: string;
|
|
};
|
|
|
|
const MentionedUserDisplay = (props: MentionedUserDisplayProps) => {
|
|
const { showProfile } = useModalState();
|
|
|
|
const handleClick = () => {
|
|
showProfile(props.pubkey);
|
|
};
|
|
return (
|
|
<button class="inline text-blue-500 underline" onClick={handleClick}>
|
|
<GeneralUserMentionDisplay pubkey={props.pubkey} />
|
|
</button>
|
|
);
|
|
};
|
|
|
|
export default MentionedUserDisplay;
|