diff --git a/src/components/note/note-contents.tsx b/src/components/note/note-contents.tsx
index beae86b04..061f727be 100644
--- a/src/components/note/note-contents.tsx
+++ b/src/components/note/note-contents.tsx
@@ -199,7 +199,7 @@ const embeds: EmbedType[] = [
switch (match[2]) {
case "npub1":
const id = normalizeToHex(match[1]);
- return id ? : match[0];
+ return id ? : match[0];
default:
return match[0];
}
@@ -215,7 +215,7 @@ const embeds: EmbedType[] = [
if (tag) {
if (tag[0] === "p" && tag[1]) {
- return ;
+ return ;
}
if (tag[0] === "e" && tag[1]) {
return ;
diff --git a/src/components/user-link.tsx b/src/components/user-link.tsx
index 6d8329d51..5f89ea333 100644
--- a/src/components/user-link.tsx
+++ b/src/components/user-link.tsx
@@ -6,15 +6,17 @@ import { useUserMetadata } from "../hooks/use-user-metadata";
export type UserLinkProps = LinkProps & {
pubkey: string;
+ showAt?: boolean;
};
-export const UserLink = ({ pubkey, ...props }: UserLinkProps) => {
+export const UserLink = ({ pubkey, showAt, ...props }: UserLinkProps) => {
const metadata = useUserMetadata(pubkey);
const npub = normalizeToBech32(pubkey, Bech32Prefix.Pubkey);
return (
- @{getUserDisplayName(metadata, pubkey)}
+ {showAt && "@"}
+ {getUserDisplayName(metadata, pubkey)}
);
};