first commit of refactor

This commit is contained in:
KS Jannette
2026-02-27 09:58:18 -05:00
commit 0adfd70853
63 changed files with 10558 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
import { useState } from "react";
import Input from "./Input";
import Button from "./Button";
export default function AddressForm({ onSubmit }) {
const [address, setAddress] = useState("");
const [label, setLabel] = useState("");
const canSubmit = address.trim().length > 0;
function handleSubmit(e) {
e.preventDefault();
if (!canSubmit) return;
onSubmit({
address: address.trim(),
label: label.trim(),
});
setAddress("");
setLabel("");
}
return (
<form onSubmit={handleSubmit}>
<Input
label="Blockchain Address"
value={address}
onChange={setAddress}
placeholder="0x..."
/>
<Input
label="Label (optional)"
value={label}
onChange={setLabel}
placeholder="Treasury, Cold Wallet, etc."
/>
<Button type="submit" disabled={!canSubmit}>
Add Address
</Button>
</form>
);
}