diff --git a/components/forms/SettingsSubmit.tsx b/components/forms/SettingsSubmit.tsx index c10f6b6f..3cfbefcd 100644 --- a/components/forms/SettingsSubmit.tsx +++ b/components/forms/SettingsSubmit.tsx @@ -7,6 +7,10 @@ import { useRouter, useSearchParams } from "next/navigation"; /** CO₂ Galvo implementation only (per spec). Other targets intentionally omitted. */ type Target = "settings_co2gal"; +// Accept any of the known targets from callers (e.g., SettingsSwitcher), +// but we still hard-lock behavior to CO₂ Galvo internally. +type ExternalTarget = "settings_fiber" | "settings_co2gan" | "settings_co2gal" | "settings_uv"; + type Opt = { id: string; label: string }; type Me = { id: string; username?: string; email?: string }; @@ -79,7 +83,7 @@ type EditInitialValues = { raster_settings?: any[] | null; }; -type BaseProps = { initialTarget?: Target }; +type BaseProps = { initialTarget?: ExternalTarget }; type CreateProps = BaseProps & { mode?: "create"; submissionId?: never; initialValues?: never }; type EditProps = BaseProps & { mode: "edit"; submissionId: string | number; initialValues: EditInitialValues }; function isEditProps(p: CreateProps | EditProps): p is EditProps {