Skip to content

Commit 371bfff

Browse files
committed
[add] children component to the step component
1 parent 6bb9af7 commit 371bfff

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/scripts/components/Step/Step.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import ContactDetails from "../ContactDetails/ContactDetails";
66
import InvestmentPlans from "../InvestmentPlans/InvestmentPlans";
77
import InvestmentPreferences from "../InvestmentPreferences/InvestmentPreferences";
88

9-
export default function Step() {
9+
export default function Step({children}) {
1010

1111
const [step, setStep] = useContext(StepContext);
1212

@@ -16,11 +16,7 @@ export default function Step() {
1616
<div className="step__title">{steps.stepPage[step].title}</div>
1717
<div className="step__caption">{steps.stepPage[step].caption}</div>
1818
</div>
19-
<Switch>
20-
<Route exact path="/" component={ContactDetails} />
21-
<Route path="/step2" component={InvestmentPlans} />
22-
<Route path="/step3" component={InvestmentPreferences} />
23-
</Switch>
19+
{children}
2420
</div>
2521
)
2622
}

0 commit comments

Comments
 (0)