- )
-}
-
// Allow user to create a new contract
// TODO: Extract to a reusable UI, for listing contracts too?
export default function NewContract() {
@@ -106,7 +44,7 @@ export default function NewContract() {
function saveField(field: keyof Contract) {
return (changeEvent: React.ChangeEvent) =>
- setContract({ ...contract, [field]: changeEvent.target.value })
+ setContract((c) => ({ ...c, [field]: changeEvent.target.value }))
}
const descriptionPlaceholder = `e.g. This market will resolve to “Yes” if, by June 2, 2021, 11:59:59 PM ET, Paxlovid (also known under PF-07321332)...`
@@ -230,7 +168,7 @@ export default function NewContract() {
Your markets
-
+