I've refactored the main components a bit so that we have one "PlotSpectrum" component that holds a "Form" component and a "Plot" component. All the form state lives in the "Form" component which will update the "PlotData" which gets passed to the "Plot" component.
I've also taken steps to better separate the react-hook-form state from the React state: stuff that gets posted to the endpoints goes in the react-hook-form state and everything else goes in the React state. As well, data is more consolidated, eg. we should have information about what database we're using included in the React state.
More to come but this is a big enough PR that I want to go ahead and get it merged.
I've refactored the main components a bit so that we have one "PlotSpectrum" component that holds a "Form" component and a "Plot" component. All the form state lives in the "Form" component which will update the "PlotData" which gets passed to the "Plot" component.
I've also taken steps to better separate the react-hook-form state from the React state: stuff that gets posted to the endpoints goes in the react-hook-form state and everything else goes in the React state. As well, data is more consolidated, eg. we should have information about what database we're using included in the React state.
More to come but this is a big enough PR that I want to go ahead and get it merged.