From 97501c6f59422fcdae4609ebbb5f1043ed15a919 Mon Sep 17 00:00:00 2001 From: Ebube Date: Mon, 29 May 2023 19:11:10 +0100 Subject: [PATCH] . --- src/components/AddJob/AddJob.jsx | 58 +++++++++++++++++++++++--------- 1 file changed, 43 insertions(+), 15 deletions(-) diff --git a/src/components/AddJob/AddJob.jsx b/src/components/AddJob/AddJob.jsx index b3a3f0f..bac4931 100644 --- a/src/components/AddJob/AddJob.jsx +++ b/src/components/AddJob/AddJob.jsx @@ -6,7 +6,7 @@ import usersService from "../../services/UsersService"; import { useSelector } from "react-redux"; -import { Form, Formik } from "formik"; +import { Field, Form, Formik } from "formik"; import * as Yup from "yup"; const validationSchema = Yup.object().shape({ @@ -50,7 +50,7 @@ function AddJob() { const ApiCall = new usersService(); const navigate = useNavigate(); - let {userDetails} = useSelector((state)=> state.userDetails) + let { userDetails } = useSelector((state) => state.userDetails); let [pageLoading, setPageLoading] = useState(true); // State used for knowing when the page is mounting @@ -199,7 +199,7 @@ function AddJob() { Select... {country.data.map((item, index) => { - if(item[0] == userDetails.country){ + if (item[0] == userDetails.country) { return ( - ) + ); } })} @@ -316,19 +316,34 @@ function AddJob() {
- + +
+ + + > + + {publicArray.map(({ name, duration }, idx) => ( + + ))} + {props.errors.timeline_days && props.touched.timeline_days && (

@@ -396,3 +411,16 @@ function AddJob() { } export default AddJob; + +const publicArray = [ + { duration: 1, name: "1 day" }, + { duration: 2, name: "2 days" }, + { duration: 3, name: "3 days" }, + { duration: 4, name: "4 days" }, + { duration: 5, name: "5 days" }, + { duration: 6, name: "6 days" }, + { duration: 7, name: "1 week" }, + { duration: 14, name: "2 weeks" }, + { duration: 21, name: "3 weeks" }, + { duration: 28, name: "4 weeks" }, +];