update note parser

This commit is contained in:
Ren Amamiya
2023-05-07 12:42:40 +07:00
parent 730f3be016
commit c39987ff1c
4 changed files with 27 additions and 27 deletions

View File

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