refactor: pass doctor, selectedSlot, and selectedDate props to SubmitData and Detail components
This commit is contained in:
@@ -67,6 +67,9 @@ function Container({
|
|||||||
prevData={prevData}
|
prevData={prevData}
|
||||||
isForAnother={isForAnother}
|
isForAnother={isForAnother}
|
||||||
setIsForAnother={setIsForAnother}
|
setIsForAnother={setIsForAnother}
|
||||||
|
doctor={doctor}
|
||||||
|
selectedSlot={selectedSlot}
|
||||||
|
selectedDate={selectedDate}
|
||||||
/>,
|
/>,
|
||||||
<Paying setStep={setStep} />,
|
<Paying setStep={setStep} />,
|
||||||
<SuccessPay setStep={setStep} />,
|
<SuccessPay setStep={setStep} />,
|
||||||
|
|||||||
@@ -15,6 +15,9 @@ function Detail({
|
|||||||
prevData,
|
prevData,
|
||||||
fadeElement,
|
fadeElement,
|
||||||
setIsPay,
|
setIsPay,
|
||||||
|
doctor,
|
||||||
|
selectedSlot,
|
||||||
|
selectedDate,
|
||||||
}) {
|
}) {
|
||||||
const [insurance, setInsurance] = useState();
|
const [insurance, setInsurance] = useState();
|
||||||
const [supplementaryInsurance, setSupplementaryInsurance] = useState();
|
const [supplementaryInsurance, setSupplementaryInsurance] = useState();
|
||||||
@@ -90,7 +93,15 @@ function Detail({
|
|||||||
</p>
|
</p>
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
<SubmitData setStep={setStep} data={data} prevData={prevData} setErrors={setErrors} />
|
<SubmitData
|
||||||
|
setStep={setStep}
|
||||||
|
data={data}
|
||||||
|
prevData={prevData}
|
||||||
|
setErrors={setErrors}
|
||||||
|
doctor={doctor}
|
||||||
|
selectedSlot={selectedSlot}
|
||||||
|
selectedDate={selectedDate}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user