Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const CronjobsTab = () => {
})
}
>
Create a queue
Create a cron job
</Button>
</div>
{filteredCronJobs.length === 0 ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ export const EdgeFunctionSection = ({ form }: HTTPRequestFieldsProps) => {

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

// Only set a default value if the field is empty
useEffect(() => {
if (isSuccess && edgeFunctions.length > 0) {
if (isSuccess && edgeFunctions.length > 0 && !form.getValues('values.edgeFunctionName')) {
const fn = edgeFunctions[0]
const functionUrl = buildFunctionUrl(
fn.slug,
Expand All @@ -51,7 +52,6 @@ export const EdgeFunctionSection = ({ form }: HTTPRequestFieldsProps) => {
form.setValue('values.edgeFunctionName', functionUrl)
}
}, [edgeFunctions, form, isSuccess, selectedProject?.ref, selectedProject?.restUrl])

return (
<SheetSection className="flex flex-col gap-6">
<FormField_Shadcn_
Expand Down
Loading