Files
lume/src/app/note/components/mentions/user.tsx
Ren Amamiya 7a10d6a3d9 minor fixes
2023-05-07 15:16:46 +07:00

12 lines
388 B
TypeScript

import { useProfile } from '@lume/utils/hooks/useProfile';
import { shortenKey } from '@lume/utils/shortenKey';
export const MentionUser = (props: { children: any[] }) => {
const pubkey = props.children[0];
const { user } = useProfile(pubkey);
return (
<span className="cursor-pointer text-fuchsia-500">@{user?.name || user?.display_name || shortenKey(pubkey)}</span>
);
};