more hacking

This commit is contained in:
Thomas Ruoff
2020-07-26 00:12:51 +02:00
parent 90a9288e84
commit 518b437d14
13 changed files with 166 additions and 54 deletions

View File

@@ -6,16 +6,18 @@ import Form from 'react-bootstrap/Form'
import WizardStore, { WizardContext, ACTIONS } from '../context/wizardStore'
import DateSelect from './dateSelect'
import Reason from './reason'
import Contact from './contact'
import Driver from './driver'
//import Driver from './driver'
const STEPS = [
{ id: 'DATE_SELECT', component: DateSelect },
{ id: 'REASON', component: Reason },
{ id: 'CONTACT', component: Contact },
]
function WizardInternal() {
const { state, dispatch } = useContext(WizardContext)
const { state, dispatch, onSubmit } = useContext(WizardContext)
const { currentStep } = state
const isFirstStep = currentStep === 0
@@ -36,7 +38,7 @@ function WizardInternal() {
return
}
dispatch({ type: ACTIONS.SUBMIT })
onSubmit()
}}
>
{STEPS.map(({ id, component: Component }, index) => (