From e218d9cd0ca67a99bae2d8b66bd4d510cc88bba1 Mon Sep 17 00:00:00 2001 From: Charis Lam <26616127+charislam@users.noreply.github.com> Date: Wed, 24 Sep 2025 16:19:22 -0400 Subject: [PATCH] fix: remove double deploy button in edge function block When the confirm footer is shown, the deploy button on the top right should be hidden (not just disabled) to avoid confusion. --- .../ui/AIAssistantPanel/EdgeFunctionRenderer.tsx | 9 +++++++-- .../ui/EdgeFunctionBlock/EdgeFunctionBlock.tsx | 5 +++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/apps/studio/components/ui/AIAssistantPanel/EdgeFunctionRenderer.tsx b/apps/studio/components/ui/AIAssistantPanel/EdgeFunctionRenderer.tsx index c73162e6d96..b91abe62c28 100644 --- a/apps/studio/components/ui/AIAssistantPanel/EdgeFunctionRenderer.tsx +++ b/apps/studio/components/ui/AIAssistantPanel/EdgeFunctionRenderer.tsx @@ -1,5 +1,6 @@ -import { PropsWithChildren, useMemo, useState } from 'react' +import { type PropsWithChildren, useMemo, useState } from 'react' import { toast } from 'sonner' +// End of third-party imports import { useParams } from 'common' import { useProjectSettingsV2Query } from 'data/config/project-settings-v2-query' @@ -100,7 +101,10 @@ export const EdgeFunctionRenderer = ({ sendEvent({ action: 'edge_function_deploy_button_clicked', properties: { origin: 'functions_ai_assistant' }, - groups: { project: ref ?? 'Unknown', organization: org?.slug ?? 'Unknown' }, + groups: { + project: ref ?? 'Unknown', + organization: org?.slug ?? 'Unknown', + }, }) setShowReplaceWarning(false) @@ -134,6 +138,7 @@ export const EdgeFunctionRenderer = ({ onCancelReplace={() => setShowReplaceWarning(false)} onConfirmReplace={() => void performDeploy()} onDeploy={handleDeploy} + hideDeployButton={showConfirmFooter} /> {showConfirmFooter && (