🐛 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:
parent
99f0b803e9
commit
aa4b7bfc32
1 changed files with 11 additions and 9 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue