fix(nodeToolbarComponent): refactor condition for rendering Edit option in SelectItem to improve readability and maintainability
This commit is contained in:
parent
ffdb7e1677
commit
b1890bdaf9
1 changed files with 12 additions and 9 deletions
|
|
@ -187,15 +187,18 @@ export default function NodeToolbarComponent({
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
</ShadTooltip>
|
</ShadTooltip>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectItem value={nodeLength == 0 ? "disabled" : "advanced"}>
|
{nodeLength > 0 && (
|
||||||
<div className="flex">
|
<SelectItem value={nodeLength === 0 ? "disabled" : "advanced"}>
|
||||||
<IconComponent
|
<div className="flex">
|
||||||
name="Settings2"
|
<IconComponent
|
||||||
className="relative top-0.5 mr-2 h-4 w-4"
|
name="Settings2"
|
||||||
/>{" "}
|
className="relative top-0.5 mr-2 h-4 w-4"
|
||||||
Edit{" "}
|
/>{" "}
|
||||||
</div>{" "}
|
Edit{" "}
|
||||||
</SelectItem>
|
</div>{" "}
|
||||||
|
</SelectItem>
|
||||||
|
)}
|
||||||
|
|
||||||
<SelectItem value={"SaveAll"}>
|
<SelectItem value={"SaveAll"}>
|
||||||
<div className="flex">
|
<div className="flex">
|
||||||
<IconComponent
|
<IconComponent
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue