diff --git a/surfsense_web/app/dashboard/[search_space_id]/automations/automations-content.tsx b/surfsense_web/app/dashboard/[search_space_id]/automations/automations-content.tsx index fa1caff96..756221d38 100644 --- a/surfsense_web/app/dashboard/[search_space_id]/automations/automations-content.tsx +++ b/surfsense_web/app/dashboard/[search_space_id]/automations/automations-content.tsx @@ -75,6 +75,7 @@ export function AutomationsContent({ searchSpaceId }: AutomationsContentProps) { total={0} loading={false} canCreate={perms.canCreate} + showCreateCta={false} /> diff --git a/surfsense_web/app/dashboard/[search_space_id]/automations/components/automations-header.tsx b/surfsense_web/app/dashboard/[search_space_id]/automations/components/automations-header.tsx index b938825a6..22ea60664 100644 --- a/surfsense_web/app/dashboard/[search_space_id]/automations/components/automations-header.tsx +++ b/surfsense_web/app/dashboard/[search_space_id]/automations/components/automations-header.tsx @@ -8,6 +8,12 @@ interface AutomationsHeaderProps { total: number; loading: boolean; canCreate: boolean; + /** + * Render the header's Create CTA. Defaults to true; the empty state owns + * the primary CTA on its own card, so the orchestrator turns this off + * there to avoid a duplicate button. + */ + showCreateCta?: boolean; } /** @@ -20,6 +26,7 @@ export function AutomationsHeader({ total, loading, canCreate, + showCreateCta = true, }: AutomationsHeaderProps) { return (
@@ -31,7 +38,7 @@ export function AutomationsHeader({ )}
- {canCreate && ( + {canCreate && showCreateCta && (