import PropTypes from 'prop-types' import { useMessageContext } from '../../context/MessageContext' import ObjectInfo from '../../common/ObjectInfo' import NewObjectForm from '../../common/NewObjectForm' import WizardView from '../../common/WizardView' const NewGCodeFile = ({ onOk, defaultValues }) => { const { showSuccess } = useMessageContext() return ( {({ handleSubmit, submitLoading, objectData, formValid }) => { const steps = [ { title: 'Upload', key: 'uplaod', content: ( ) }, { title: 'Required', key: 'required', content: ( ) }, { title: 'Summary', key: 'summary', content: ( ) } ] return ( { const result = await handleSubmit() if (result) { showSuccess('Finished uploading GCode file!') onOk() } }} /> ) }} ) } NewGCodeFile.propTypes = { onOk: PropTypes.func.isRequired, reset: PropTypes.bool, defaultValues: PropTypes.object } export default NewGCodeFile