hook Options form submit to RUN dispatch

This commit is contained in:
Sorrel Bri 2019-12-20 14:08:22 -08:00
parent b748c8d104
commit 98864740ca

View file

@ -29,15 +29,19 @@ const Options = props => {
}); });
} }
const handleFormSubmit = e => { const handleFormSubmit = (e, options) => {
e.preventDefault(); e.preventDefault();
props.dispatch({
type: 'RUN',
value: options
});
} }
return ( return (
<div className="Options" data-testid="Options"> <div className="Options" data-testid="Options">
<h3>Modeling Options</h3> <h3>Modeling Options</h3>
<form onSubmit={e=>handleFormSubmit(e)} data-testid="Options-form"> <form onSubmit={e=>handleFormSubmit(e, props.options)} data-testid="Options-form">
{/* <h5>Output</h5> */} {/* <h5>Output</h5> */}