diff --git a/frontend/src/app/json-editor/page.tsx b/frontend/src/app/json-editor/page.tsx index 748d864c9..b6cffaf6f 100644 --- a/frontend/src/app/json-editor/page.tsx +++ b/frontend/src/app/json-editor/page.tsx @@ -62,7 +62,7 @@ export default function JSONGenerator() { useEffect(() => { fetchCategories() .then(setCategories) - .catch(error => console.error("Error fetching categories:", error)); + .catch((error) => console.error("Error fetching categories:", error)); }, []); const updateScript = useCallback((key: keyof Script, value: Script[keyof Script]) => { @@ -75,14 +75,11 @@ export default function JSONGenerator() { if (updated.type === "pve") { scriptPath = `tools/pve/${updated.slug}.sh`; - } - else if (updated.type === "addon") { + } else if (updated.type === "addon") { scriptPath = `tools/addon/${updated.slug}.sh`; - } - else if (method.type === "alpine") { + } else if (method.type === "alpine") { scriptPath = `${updated.type}/alpine-${updated.slug}.sh`; - } - else { + } else { scriptPath = `${updated.type}/${updated.slug}.sh`; } @@ -145,12 +142,9 @@ export default function JSONGenerator() { {zodErrors && (
- {zodErrors.errors.map((error, index) => ( + {zodErrors.issues.map((error, index) => ( - {error.path.join(".")} - {" "} - - - {error.message} + {error.path.join(".")} -{error.message} ))}
@@ -168,31 +162,25 @@ export default function JSONGenerator() {
- updateScript("name", e.target.value)} /> + updateScript("name", e.target.value)} />
- updateScript("slug", e.target.value)} /> + updateScript("slug", e.target.value)} />
updateScript("logo", e.target.value || null)} + onChange={(e) => updateScript("logo", e.target.value || null)} />
@@ -200,19 +188,17 @@ export default function JSONGenerator() { updateScript("config_path", e.target.value || null)} + onChange={(e) => updateScript("config_path", e.target.value || null)} />