fix: git mount add button not adding mounts

This commit is contained in:
Alex Blank
2026-05-27 15:17:34 +02:00
parent 33d08faf70
commit bcefeb4163
+2 -3
View File
@@ -16,9 +16,8 @@ export const GitMountEditor = ({ mounts, onChange }: GitMountEditorProps) => {
branch: "", branch: "",
}); });
const handleAdd = () => { const handleAdd = (mount: GitMount) => {
if (!newMount.remote_url || !newMount.target_path) return; onChange([...mounts, mount]);
onChange([...mounts, { ...newMount }]);
setNewMount({ remote_url: "", source_path: ".", target_path: "", branch: "" }); setNewMount({ remote_url: "", source_path: ".", target_path: "", branch: "" });
}; };