Skip to content

Commit 225bd94

Browse files
committed
[add] history to the step2 to go to step3
1 parent 22f660a commit 225bd94

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/scripts/components/InvestmentPlans/InvestmentPlans.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import useForm from "../../hooks/useForm/useForm";
66
import ValidationForm from "../../validation/validationForm";
77
import { StepContext } from "../../context/StepContext";
88
import { UserContext } from "../../context/UserContext";
9+
import { useHistory } from "react-router";
910

1011
export default function InvestmentPlans() {
1112

@@ -16,8 +17,11 @@ export default function InvestmentPlans() {
1617

1718
const validation = new ValidationForm();
1819

20+
let history = useHistory();
21+
1922
const nextStep = () => {
2023
setStep(step + 1);
24+
history.push("/step3");
2125
}
2226

2327
return (

0 commit comments

Comments
 (0)