Files
zap.stream/src/element/mention.tsx
Alejandro Gomez 4aafb19f7e feat: mentions
2023-06-28 16:56:43 +00:00

21 lines
423 B
TypeScript

import { useUserProfile } from "@snort/system-react";
import { System } from "index";
interface MentionProps {
pubkey: string;
relays?: string[];
}
export function Mention({ pubkey, relays }: MentionProps) {
const user = useUserProfile(System, pubkey);
return (
<a
href={`https://snort.social/p/${pubkey}`}
target="_blank"
rel="noreferrer"
>
{user?.name || pubkey}
</a>
);
}