text updated
This commit is contained in:
@@ -10,10 +10,10 @@ export default function LoanDetails({step, handleStep, screens}) {
|
||||
<div className='mt-3 h-full flex flex-col gap-3'>
|
||||
<p className='font-semibold text-base md:text-xl'>Loan Details</p>
|
||||
<div className='text-input w-full flex flex-col gap-2 justify-center items-center'>
|
||||
<p className='w-full text-base md:text-xl'>Loan Amount: ₦{step.details.selectedAmount}</p>
|
||||
<p className='w-full text-base md:text-xl'>Interest 3%: ₦{step.details.selectedAmount*0.03}</p>
|
||||
<p className='w-full text-base md:text-xl'>Mgt Fee 1%: ₦{step.details.selectedAmount*0.01}</p>
|
||||
<p className='w-full text-base md:text-xl'>Insurance 1%: ₦{step.details.selectedAmount*0.01}</p>
|
||||
<p className='w-full text-base md:text-xl'>Loan Amount: ₦{step.details.typedAmount}</p>
|
||||
<p className='w-full text-base md:text-xl'>Interest 3%: ₦{step.details.typedAmount*0.03}</p>
|
||||
<p className='w-full text-base md:text-xl'>Mgt Fee 1%: ₦{step.details.typedAmount*0.01}</p>
|
||||
<p className='w-full text-base md:text-xl'>Insurance 1%: ₦{step.details.typedAmount*0.01}</p>
|
||||
</div>
|
||||
<div className='mt-3 flex justify-center'>
|
||||
<button onClick={handleGetLoan} className='p-3 bg-purple-800 text-lg sm:text-2xl text-white font-bold rounded'>Accept</button>
|
||||
|
||||
@@ -23,6 +23,12 @@ export default function LoanPin({step, handleStep, screens}) {
|
||||
if(!fields.pin){
|
||||
throw ({message:'Please enter pin'})
|
||||
}
|
||||
// if(isNaN(fields.pin)){
|
||||
// throw ({message:'Amount must be a valid figure'})
|
||||
// }
|
||||
if(fields.pin.length != 4){
|
||||
throw ({message:'Pin must be 4 digits'})
|
||||
}
|
||||
return verifyLoan(fields)
|
||||
},
|
||||
onError: (error) => {
|
||||
@@ -39,7 +45,8 @@ export default function LoanPin({step, handleStep, screens}) {
|
||||
{!isSuccess ?
|
||||
<div className='mt-3 flex flex-col gap-4'>
|
||||
<div className='text-input font-semibold w-full flex flex-col gap-4 justify-center items-center'>
|
||||
<Label name='Enter your pin' htmlfor='pin' />
|
||||
<p className='text-center text-base md:text-xl'>{`Your loan of ₦${step.details.typedAmount} would be set up. T&C's apply.`}</p>
|
||||
<Label name='Enter your 5 Digit pin' htmlfor='pin' />
|
||||
<InputText id='pin' name='pin' type='text' value={pin} handleChange={handlePinChange} />
|
||||
<button onClick={()=>{proceed.mutate()}} disabled={proceed.isPending} className='p-3 bg-purple-800 text-base sm:text-xl text-white font-bold rounded'>{proceed.isPending ? 'loading...' : 'Continue'}</button>
|
||||
</div>
|
||||
@@ -47,8 +54,8 @@ export default function LoanPin({step, handleStep, screens}) {
|
||||
:
|
||||
<div className='mt-3 flex flex-col gap-4'>
|
||||
<div className='text-input font-semibold w-full flex flex-col gap-4 justify-center items-center'>
|
||||
<p className='text-center text-base md:text-xl'>Loan request has been accepted</p>
|
||||
<p className='text-center text-base md:text-xl'>You will get an sms with result shortly</p>
|
||||
<p className='text-center text-base md:text-xl'>Your loan is being disbursed. You will receive a confirmation SMS shortly.</p>
|
||||
{/* <p className='text-center text-base md:text-xl'>You will get an sms with result shortly</p> */}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ export default function SelectedOffer({step, handleStep, screens}) {
|
||||
},
|
||||
onSuccess: (res) => {
|
||||
// const selectedOffer = res.data.loan[0].loan
|
||||
handleStep({loan_application_id:res.data.loan_application_id[0], ...step.details}, screens.loan_details)
|
||||
handleStep({typedAmount: Number(amount),loan_application_id:res.data.loan_application_id[0], ...step.details}, screens.loan_details)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user