mirror of
https://github.com/supabase/supabase.git
synced 2026-10-13 21:29:08 +03:00
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.
This commit is contained in:
1 parent
2b8c73b0e3
commit
e218d9cd0c
2 files changed
+10
-4
No files matched your search
@@ -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 && (
|
||||
<div className="mx-4">
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { Code } from 'lucide-react'
|
||||
import Link from 'next/link'
|
||||
import { DragEvent, ReactNode } from 'react'
|
||||
import type { DragEvent, ReactNode } from 'react'
|
||||
// End of third-party imports
|
||||
|
||||
import { ReportBlockContainer } from 'components/interfaces/Reports/ReportBlock/ReportBlockContainer'
|
||||
import { Button, cn, CodeBlock, CodeBlockLang } from 'ui'
|
||||
import { Button, CodeBlock, type CodeBlockLang, cn } from 'ui'
|
||||
import { Admonition } from 'ui-patterns'
|
||||
|
||||
interface EdgeFunctionBlockProps {
|
||||
|
||||
Reference in new issue
Block a user