refactor: conditionally render cancel button in KYC stepper navigation

This commit is contained in:
sazzadulalambd
2026-05-06 18:26:27 +06:00
parent 016f12ae83
commit 5265d69668

View File

@@ -2571,12 +2571,25 @@ function NewApplicationModal({ isOpen, onClose, onSave }: { isOpen: boolean; onC
>
<ChevronDown className="w-4 h-4 rotate-90" /> Previous
</button>
<div className="flex gap-2">
<button onClick={onClose} className="px-4 py-2 border border-slate-200 text-slate-600 rounded-lg text-sm hover:bg-slate-100">
Cancel
</button>
<div className="flex gap-2 ">
{step < 5 ? (
<button onClick={() => setStep(step + 1)} className="px-4 py-2 bg-accent text-white rounded-lg text-sm hover:bg-accent-dark flex items-center gap-2">
<button
onClick={onClose}
className="px-4 py-2 border border-slate-200 text-slate-600 rounded-lg text-sm hover:bg-slate-100 z-10"
>
Cancel
</button>
) : (
<
>
</>
)}
{step < 5 ? (
<button
onClick={() => setStep(step + 1)}
className="px-4 py-2 bg-accent text-white rounded-lg text-sm hover:bg-accent-dark flex items-center gap-2"
>
Next <ChevronDown className="w-4 h-4 -rotate-90" />
</button>
) : (