update threads (kind 30023) page
This commit is contained in:
@@ -1,8 +1,15 @@
|
||||
import { useProfile } from "@utils/hooks/useProfile";
|
||||
import { shortenKey } from "@utils/shortenKey";
|
||||
|
||||
const hexRegex = /[0-9A-Fa-f]{6}/g;
|
||||
|
||||
export function MentionUser(props: { children: any[] }) {
|
||||
const pubkey = props.children[0];
|
||||
const pubkey = props.children[0].match(hexRegex) ? props.children[0] : null;
|
||||
|
||||
if (!pubkey) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const { user } = useProfile(pubkey);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user