diff --git a/apps/web/src/components/settings/calendar-source-form.tsx b/apps/web/src/components/settings/calendar-source-form.tsx index 234324c..378d92a 100644 --- a/apps/web/src/components/settings/calendar-source-form.tsx +++ b/apps/web/src/components/settings/calendar-source-form.tsx @@ -94,13 +94,14 @@ export function CalendarSourceForm({ } }, [t]); - // Form is valid when name, type, and url are filled and url is https + // Form is valid when name, type, and url are filled and url passed validation. + // Do NOT call validateUrl here — it calls setUrlError which is a state update + // during render (React error #301). onChange/onBlur already set urlError. const isFormValid = name.trim() !== '' && type !== '' && url.trim() !== '' && - !urlError && - validateUrl(url); + !urlError; const handleSubmit = useCallback( async (e: React.FormEvent) => {