Files
rabbit/src/components/textNote/MentionedUserDisplay.tsx
Shusui MOYATANI 5474c85ace update
2023-04-29 00:22:03 +09:00

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;