not eligible screen bug fixed

This commit is contained in:
victorAnumudu
2025-03-04 15:14:41 +01:00
parent df7ca95653
commit 9d7cb31094
2 changed files with 10 additions and 6 deletions
@@ -4,11 +4,7 @@ export default function GetLoan({step, handleStep, screens, typeToShow, setShowT
const handleGetLoan = () => {
// handleStep({...step.details}, screens.pin)
if(step?.activeUser?.salary_account){
handleStep({...step.details}, screens.terms_conditions)
}else{
handleStep({...step.details}, screens.not_eligible)
}
handleStep({...step.details}, screens.terms_conditions)
}
const handlePayLoan = () => {
@@ -13,6 +13,14 @@ export default function ProductDetails({step, handleStep, screens}) {
const products = data?.data?.product_data?.products // PRODUCTS LIST
const handleClick = (product) => {
if(step?.activeUser?.salary_account){
handleStep(product, screens.getLoan)
}else{
handleStep({...step.details}, screens.not_eligible)
}
}
return (
<>
<div className='mt-3 flex flex-col gap-3'>
@@ -34,7 +42,7 @@ export default function ProductDetails({step, handleStep, screens}) {
<button
key={product?.cid}
disabled={isDisabled}
onClick={()=>handleStep(product, screens.getLoan)}
onClick={()=>handleClick(product)}
className={`w-full flex gap-2 justify-between items-center p-2 bg-purple-800 text-base sm:text-xl text-white font-bold rounded ${isDisabled && 'opacity-50'}`}
>
<span>{product?.description}</span>