mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 22:47:15 +01:00
more hacking
This commit is contained in:
@@ -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) => (
|
||||
|
||||
Reference in New Issue
Block a user