refactor: pass doctor, selectedSlot, and selectedDate props to SubmitData and Detail components

This commit is contained in:
hamed
2025-11-18 16:03:46 +03:30
parent 0d547b91bc
commit 6d6d27bcc9
2 changed files with 15 additions and 1 deletions
+3
View File
@@ -67,6 +67,9 @@ function Container({
prevData={prevData}
isForAnother={isForAnother}
setIsForAnother={setIsForAnother}
doctor={doctor}
selectedSlot={selectedSlot}
selectedDate={selectedDate}
/>,
<Paying setStep={setStep} />,
<SuccessPay setStep={setStep} />,
+12 -1
View File
@@ -15,6 +15,9 @@ function Detail({
prevData,
fadeElement,
setIsPay,
doctor,
selectedSlot,
selectedDate,
}) {
const [insurance, setInsurance] = useState();
const [supplementaryInsurance, setSupplementaryInsurance] = useState();
@@ -90,7 +93,15 @@ function Detail({
</p>
</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>
);