Skip to content

Commit 6d2a81c

Browse files
authored
Fix/ef selection (supabase#30682)
* Fix edge function selection * button change
1 parent d8a57c1 commit 6d2a81c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

apps/studio/components/interfaces/Integrations/CronJobs/CronJobsTab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export const CronjobsTab = () => {
8181
})
8282
}
8383
>
84-
Create a queue
84+
Create a cron job
8585
</Button>
8686
</div>
8787
{filteredCronJobs.length === 0 ? (

apps/studio/components/interfaces/Integrations/CronJobs/EdgeFunctionSection.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ export const EdgeFunctionSection = ({ form }: HTTPRequestFieldsProps) => {
4040

4141
const edgeFunctions = useMemo(() => functions ?? [], [functions])
4242

43+
// Only set a default value if the field is empty
4344
useEffect(() => {
44-
if (isSuccess && edgeFunctions.length > 0) {
45+
if (isSuccess && edgeFunctions.length > 0 && !form.getValues('values.edgeFunctionName')) {
4546
const fn = edgeFunctions[0]
4647
const functionUrl = buildFunctionUrl(
4748
fn.slug,
@@ -51,7 +52,6 @@ export const EdgeFunctionSection = ({ form }: HTTPRequestFieldsProps) => {
5152
form.setValue('values.edgeFunctionName', functionUrl)
5253
}
5354
}, [edgeFunctions, form, isSuccess, selectedProject?.ref, selectedProject?.restUrl])
54-
5555
return (
5656
<SheetSection className="flex flex-col gap-6">
5757
<FormField_Shadcn_

0 commit comments

Comments
 (0)