🐛 fix(GenericNode): add conditional rendering to documentation link to prevent empty href

The documentation link was previously always rendered, even if the href was empty. This caused an issue where the link would be clickable but lead to nowhere. The fix adds a conditional rendering to the link, so it is only rendered if the href is not empty.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-06-24 16:38:11 -03:00
commit aa4b7bfc32

View file

@ -115,15 +115,17 @@ export default function GenericNode({
</div>
<div className="flex gap-3">
<div className=" px-5 pb-3 mr-5">
<Tooltip title={`Open ${data.node.display_name} documentation`}>
<a
href={data.node.documentation}
target="_blank"
rel="noopener noreferrer"
>
<Info />
</a>
</Tooltip>
{data.node.documentation !== "" && (
<Tooltip title={`Open ${data.node.display_name} documentation`}>
<a
href={data.node.documentation}
target="_blank"
rel="noopener noreferrer"
>
<Info />
</a>
</Tooltip>
)}
</div>
<div>
<Tooltip