editor: don't show open & copy tools for empty links

Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com>
This commit is contained in:
01zulfi
2025-08-28 11:45:12 +05:00
parent 874352e753
commit aaf82f359b

View File

@@ -196,6 +196,7 @@ export function OpenLink(props: ToolProps) {
const link = node ? findMark(node, "link") : null;
if (!link) return null;
const href = link?.attrs.href;
if (!href) return null;
return (
<Flex sx={{ alignItems: "center" }}>
@@ -245,6 +246,7 @@ export function CopyLink(props: ToolProps) {
const link = node ? findMark(node, "link") : null;
if (!link) return null;
const href = link?.attrs.href;
if (!href) return null;
return (
<ToolButton