{gptOption && (
)}
{activeLink ? (
{
window.open(href, "_blank");
}}
icon="externalLinkFill"
enabled
/>
) : (
{
if (isEditing) {
setIsEditing(false);
} else {
handleClickEdit();
}
}}
icon="link"
enabled
active={isEditing}
/>
)}
{isEditing && (
) => setHref(e.target.value)}
value={href}
onKeyDown={(e: KeyboardEvent) => {
const { code } = e;
if (code === "Enter") {
submitHref();
}
if (code === "Escape") {
cancelHref();
}
}}
/>
)}
);
};