diff --git a/src/components/Stepper/index.js b/src/components/Stepper/index.js index 62d2125..c824e8d 100644 --- a/src/components/Stepper/index.js +++ b/src/components/Stepper/index.js @@ -6,21 +6,10 @@ function Stepper({ deactiveColor, count, currentStep, + steps }) { - const steps = [ - { - title: 'اطلاعات هویتی' - }, - { - title: 'مشخصات والدین' - }, - { - title: 'قوانین و مقررات' - }, - { - title: 'تایید اطلاعات' - }, - ] + + return (
-

{item.title}

+

{item.title}

{count !== (Number(index) + 1) && ( + )} + + ))} ); diff --git a/src/view/register/index.js b/src/view/register/index.js index 1b78a20..3a4a774 100644 --- a/src/view/register/index.js +++ b/src/view/register/index.js @@ -18,6 +18,7 @@ const Register = ({ activeLogin }) => { const [index, setIndex] = useState(1); const [register, setRegister] = useState(false); const timeoutRef = useRef(null); + const [activeStep, setActiveStep] = useState([true, false, false, false]); const focusHandler = (id) => { let inputs = document.querySelectorAll(".Login-box-form-item"); @@ -46,19 +47,19 @@ const Register = ({ activeLogin }) => { const stepCont = [ { title: 'اطلاعات هویتی', - step: 0 + active: activeStep[0] }, { title: 'مشخصات والدین', - step: 1 + active: activeStep[1] }, { title: 'قوانین و مقررات', - step: 2 + active: activeStep[2] }, { title: 'تایید اطلاعات', - step: 3 + active: activeStep[3] }, ] const grades = [ @@ -122,7 +123,6 @@ const Register = ({ activeLogin }) => {
{/* form */} -
@@ -155,7 +155,7 @@ const Register = ({ activeLogin }) => { ) } */} - +
@@ -188,10 +188,10 @@ const Register = ({ activeLogin }) => {
- +
- +
@@ -227,9 +227,10 @@ const Register = ({ activeLogin }) => {
-
@@ -341,15 +342,17 @@ const Register = ({ activeLogin }) => {
-
-
@@ -384,28 +387,30 @@ const Register = ({ activeLogin }) => {
- + -
+
-
-
@@ -422,21 +427,22 @@ const Register = ({ activeLogin }) => {

لطفا اطلاعات مربوط هویتی پدر را وارد کنید

- -
-
-
-
-
+ +
+
-