further hacking

This commit is contained in:
Thomas Ruoff
2020-07-26 00:41:33 +02:00
parent 518b437d14
commit a099d50097
5 changed files with 42 additions and 43 deletions

View File

@@ -23,6 +23,8 @@ function WizardInternal() {
const isFirstStep = currentStep === 0
const isLastStep = currentStep === STEPS.length - 1
const CurrentStepComponent = STEPS[currentStep].component
return (
<Form
onSubmit={(event) => {
@@ -41,9 +43,7 @@ function WizardInternal() {
onSubmit()
}}
>
{STEPS.map(({ id, component: Component }, index) => (
<>{currentStep === index && <Component />}</>
))}
<CurrentStepComponent />
{!isFirstStep && (
<Button
variant="secondary"