Only returns User Country as Default Country in Add Job Page #80
@@ -36,15 +36,15 @@ const validationSchema = Yup.object().shape({
|
||||
.required("Timeline is required"),
|
||||
});
|
||||
|
||||
let initialValues = {
|
||||
// initial values for formik
|
||||
country: "",
|
||||
price: 0,
|
||||
title: "",
|
||||
description: "",
|
||||
job_detail: "",
|
||||
timeline_days: "",
|
||||
};
|
||||
// let initialValues = {
|
||||
// // initial values for formik
|
||||
// country: "NG",
|
||||
// price: 0,
|
||||
// title: "",
|
||||
// description: "",
|
||||
// job_detail: "",
|
||||
// timeline_days: "",
|
||||
// };
|
||||
|
||||
function AddJob() {
|
||||
const ApiCall = new usersService();
|
||||
@@ -60,6 +60,16 @@ function AddJob() {
|
||||
data: [],
|
||||
}); // To Hold the array of country getUserCountry returns
|
||||
|
||||
let initialValues = {
|
||||
// initial values for formik
|
||||
country: userDetails.country,
|
||||
price: "",
|
||||
title: "",
|
||||
description: "",
|
||||
job_detail: "",
|
||||
timeline_days: "",
|
||||
};
|
||||
|
||||
let [requestStatus, setRequestStatus] = useState({
|
||||
loading: false,
|
||||
status: false,
|
||||
@@ -123,8 +133,8 @@ function AddJob() {
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
setPageLoading(false);
|
||||
getUserCountry();
|
||||
setPageLoading(false);
|
||||
}, []);
|
||||
|
||||
return pageLoading.loading ? (
|
||||
@@ -173,6 +183,7 @@ function AddJob() {
|
||||
<select
|
||||
id="country"
|
||||
name="country"
|
||||
disabled
|
||||
value={props.values.country}
|
||||
className={`input-field p-2 mt-3 rounded-md placeholder:text-base text-dark-gray dark:text-white w-full h-10 bg-slate-100 dark:bg-[#11131F] focus:ring-0 focus:outline-none`}
|
||||
onChange={props.handleChange}
|
||||
@@ -223,7 +234,7 @@ function AddJob() {
|
||||
inputBg="bg-slate-100"
|
||||
type="number"
|
||||
name="price"
|
||||
// placeholder="Please Enter Amount"
|
||||
placeholder="0"
|
||||
value={props.values.price}
|
||||
inputHandler={props.handleChange}
|
||||
blurHandler={props.handleBlur}
|
||||
|
||||
Reference in New Issue
Block a user