import { Button, InputCompOne } from ".."; import {Formik, Form} from 'formik' import * as Yup from "yup"; const initialValues = { monthly_salary: "", loan_amount: "", duration: 6 }; // To get the validation schema const validationSchema = Yup.object().shape({ duration: Yup.number() .required("Required"), monthly_salary: Yup.string() .required("Required") .test("no-e", "Invalid", (value:any) => { if (value && /^[0-9]*$/.test(value) == false) { return false; } return true; }), loan_amount: Yup.string() .required("Required") .test("no-e", "Invalid", (value:any) => { if (value && /^[0-9]*$/.test(value) == false) { return false; } return true; }), }); // interface SliderProps { // handleSliderChange: (e: React.ChangeEvent) => void; // value: number; // } interface LoanAmountProps { handleNextStep: any; } const LoanAmountComp: React.FC = ({ handleNextStep }) => { // const [value, setValue] = React.useState(6); // const handleSliderChange = (e: any) => { // setValue(e.target.value); // }; //FUNCTION TO HANDLE SUBMIT const handleSubmit = (values:any) => { console.log(values) handleNextStep() }; return ( <>

Loan Amount

For more enquiries and support

Call: 09099000000

Email: fcmbloan@support.com

{(props)=>(

The maximum amount you can apply for on this offer is based on the information you shared with us in your loan application. We have made this offer to suit your monthly remuneration and to enable you pay your loan on-time

Minimum Offer:

N100,000

Maximum Offer:

N500,000

<>

For how many months? {(props.errors.duration && props.touched.duration) ? props.errors.duration : ''}

{props.values.duration} months

Your Monthly Repayment

N

)}
); }; export default LoanAmountComp; // const Slider: React.FC = ({ handleSliderChange, value }) => { // return ( //
//

For how many months?

//
// //
//
// {value} months //
//
// ); // };