diff --git a/apps/webapp/app/components/navigation/SideMenu.tsx b/apps/webapp/app/components/navigation/SideMenu.tsx index a74ff7ca315..1a7d71488d7 100644 --- a/apps/webapp/app/components/navigation/SideMenu.tsx +++ b/apps/webapp/app/components/navigation/SideMenu.tsx @@ -44,29 +44,35 @@ export function OrganizationsSideMenu() { return null; } - const items: SideMenuItem[] = [ + let items: SideMenuItem[] = [ { name: "Workflows", icon: , to: `/orgs/${currentOrganization.slug}`, }, - { - name: "API Integrations", - icon: , - to: `/orgs/${currentOrganization.slug}/integrations`, - }, - { - name: "Team", - icon: , - to: `/orgs/${currentOrganization.slug}/members`, - }, - { - name: "New Workflow", - icon: , - to: `/orgs/${currentOrganization.slug}/workflows/new`, - }, ]; + if (currentOrganization.workflows.length > 0) { + items = [ + ...items, + { + name: "API Integrations", + icon: , + to: `/orgs/${currentOrganization.slug}/integrations`, + }, + { + name: "Team", + icon: , + to: `/orgs/${currentOrganization.slug}/members`, + }, + { + name: "New Workflow", + icon: , + to: `/orgs/${currentOrganization.slug}/workflows/new`, + }, + ]; + } + return ( );