Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #201

Open
wants to merge 13 commits into
base: development
Choose a base branch
from
Prev Previous commit
feat/Add form submission handling: Log payload to console on save
  • Loading branch information
IraBoh committed Nov 19, 2024
commit 0258bfcdde719f30548cac4c04881d577ccdd114
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,22 @@ export function EnvironmentVariableForm() {
}
};

const handleSubmit = (e: React.FormEvent) => {
e.preventDefault();

const validItems = items.filter(item =>
item.key.trim() !== "" || item.value.trim() !== ""
);

console.log("Saved Environment Variables", validItems.map(item => ({
key: item.key,
value: item.value
})))
};

return (
<div className="w-full">
<Form method="post" className="w-full">
<Form method="post" className="w-full" onSubmit={handleSubmit}>
<div className="bg-background shadow-sm rounded-lg px-16 py-4 space-y-4">
<div className="rounded-md border">
<Table>
Expand Down
Loading