From 2cf6c7d1be0f9e3a2efc056d0f9b4c41ad9fb390 Mon Sep 17 00:00:00 2001 From: Ryan Hopper-Lowe Date: Wed, 18 Dec 2024 15:20:58 -0600 Subject: [PATCH] fix: conditionally render EnvironmentVariableSection to avoid empty state --- .../shared/EnvironmentVariableSection.tsx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/ui/admin/app/components/agent/shared/EnvironmentVariableSection.tsx b/ui/admin/app/components/agent/shared/EnvironmentVariableSection.tsx index 6f6ea6882..ad21ec60d 100644 --- a/ui/admin/app/components/agent/shared/EnvironmentVariableSection.tsx +++ b/ui/admin/app/components/agent/shared/EnvironmentVariableSection.tsx @@ -62,14 +62,16 @@ export function EnvironmentVariableSection({ return (
- - item.name} - items={items} - renderItem={renderItem} - selected={items.map((item) => item.name)} - /> - + {!!items.length && ( + + item.name} + items={items} + renderItem={renderItem} + selected={items.map((item) => item.name)} + /> + + )}