diff --git a/app/settings/co2-galvo/[id]/page.tsx b/app/settings/co2-galvo/[id]/page.tsx
index ca7459f4..a2bf90b2 100644
--- a/app/settings/co2-galvo/[id]/page.tsx
+++ b/app/settings/co2-galvo/[id]/page.tsx
@@ -1,11 +1,12 @@
+// app/settings/co2-galvo/[id]/co2-galvo.tsx
"use client";
import { useParams, useSearchParams } from "next/navigation";
import CO2GalvoDetail from "@/components/details/CO2GalvoDetail";
-export default function CO2GalvoDetailStandalone() {
- const params = useParams<{ id: string }>();
+export default function CO2GalvoSettingDetailPage() {
+ const { id } = useParams<{ id: string }>();
const sp = useSearchParams();
const edit = sp.get("edit") === "1";
- return sources so images actually load
+const API_BASE = (process.env.NEXT_PUBLIC_API_BASE_URL || "").replace(/\/$/, "");
function fileUrl(id?: string) {
- return id ? `/api/dx/assets/${id}` : "";
+ if (!id) return "";
+ if (API_BASE) return `${API_BASE}/assets/${id}`;
+ return `/api/dx/assets/${id}`; // fallback if you proxy assets
}
export default function CO2GalvoDetail({
@@ -166,16 +171,16 @@ export default function CO2GalvoDetail({
setting_notes: rec.setting_notes ?? "",
photo: photoId,
screen: screenId,
- mat: matId ? String(matId) : null,
- mat_coat: coatId ? String(coatId) : null,
- mat_color: colorId ? String(colorId) : null,
- mat_opacity: opacityId ? String(opacityId) : null,
+ mat: matId ? String(matId) : null,
+ mat_coat: coatId ? String(coatId) : null,
+ mat_color: colorId ? String(colorId) : null,
+ mat_opacity: opacityId ? String(opacityId) : null,
mat_thickness: rec.mat_thickness ?? null,
- source: sourceId != null ? String(sourceId) : null,
- lens: lensId != null ? String(lensId) : null,
- focus: rec.focus ?? null,
- laser_soft: rec.laser_soft ?? null,
- repeat_all: rec.repeat_all ?? null,
+ source: sourceId != null ? String(sourceId) : null,
+ lens: lensId != null ? String(lensId) : null,
+ focus: rec.focus ?? null,
+ laser_soft: rec.laser_soft ?? null,
+ repeat_all: rec.repeat_all ?? null,
fill_settings: rec.fill_settings ?? [],
line_settings: rec.line_settings ?? [],
raster_settings: rec.raster_settings ?? [],
@@ -251,13 +256,23 @@ export default function CO2GalvoDetail({