build fixes

This commit is contained in:
makearmy 2025-10-05 12:35:24 -04:00
parent 26fa64790d
commit eb962b8283

View file

@ -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 {