feat: render nostr mentions in chat

This commit is contained in:
2023-07-30 23:02:11 +02:00
parent efd2f756fe
commit 7583fa1fd4
8 changed files with 100 additions and 40 deletions

View File

@ -1,7 +1,22 @@
import { Icon } from "element/icon";
export function ExternalIconLink({ size = 32, href, ...rest }) {
return (
<span style={{ cursor: "pointer" }}>
<Icon
name="link"
size={size}
onClick={() => window.open(href, "_blank")}
{...rest}
/>
</span>
);
}
export function ExternalLink({ children, href }) {
return (
<a href={href} rel="noopener noreferrer" target="_blank">
{children}
</a>
)
);
}