Skip to content

Commit

Permalink
fix: conditionally render EnvironmentVariableSection to avoid empty s…
Browse files Browse the repository at this point in the history
…tate (#959)
  • Loading branch information
ryanhopperlowe authored Dec 18, 2024
1 parent 29a7f76 commit c1ad4bc
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,16 @@ export function EnvironmentVariableSection({

return (
<div className="flex flex-col gap-2">
<Card className="py-2 px-4">
<SelectList
getItemKey={(item) => item.name}
items={items}
renderItem={renderItem}
selected={items.map((item) => item.name)}
/>
</Card>
{!!items.length && (
<Card className="py-2 px-4">
<SelectList
getItemKey={(item) => item.name}
items={items}
renderItem={renderItem}
selected={items.map((item) => item.name)}
/>
</Card>
)}

<Dialog open={open} onOpenChange={onOpenChange}>
<DialogTrigger asChild>
Expand Down

0 comments on commit c1ad4bc

Please sign in to comment.