Only pass finish props on final step to avoid TS excess props
cgen-60357f089d224893b45f77257192e804
This commit is contained in:
parent
bea18b6fbd
commit
4d10efa5df
1 changed files with 12 additions and 10 deletions
|
|
@ -216,16 +216,18 @@ export default function Onboarding() {
|
|||
<SkeletonOnboardingStep />
|
||||
) : (
|
||||
<div className="animate-fade-in">
|
||||
<CurrentStepComponent
|
||||
data={data}
|
||||
updateData={updateData}
|
||||
nextStep={nextStep}
|
||||
prevStep={prevStep}
|
||||
currentStep={currentStep}
|
||||
totalSteps={steps.length}
|
||||
onFinish={finishOnboarding}
|
||||
isFinishing={isFinishing}
|
||||
/>
|
||||
{currentStep === steps.length - 1 ? (
|
||||
<Welcome data={data} onFinish={finishOnboarding} isFinishing={isFinishing} />
|
||||
) : (
|
||||
<CurrentStepComponent
|
||||
data={data}
|
||||
updateData={updateData}
|
||||
nextStep={nextStep}
|
||||
prevStep={prevStep}
|
||||
currentStep={currentStep}
|
||||
totalSteps={steps.length}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue