disabled user country
This commit was merged in pull request #80.
This commit is contained in:
@@ -36,15 +36,15 @@ const validationSchema = Yup.object().shape({
|
|||||||
.required("Timeline is required"),
|
.required("Timeline is required"),
|
||||||
});
|
});
|
||||||
|
|
||||||
let initialValues = {
|
// let initialValues = {
|
||||||
// initial values for formik
|
// // initial values for formik
|
||||||
country: "",
|
// country: "NG",
|
||||||
price: 0,
|
// price: 0,
|
||||||
title: "",
|
// title: "",
|
||||||
description: "",
|
// description: "",
|
||||||
job_detail: "",
|
// job_detail: "",
|
||||||
timeline_days: "",
|
// timeline_days: "",
|
||||||
};
|
// };
|
||||||
|
|
||||||
function AddJob() {
|
function AddJob() {
|
||||||
const ApiCall = new usersService();
|
const ApiCall = new usersService();
|
||||||
@@ -60,6 +60,16 @@ function AddJob() {
|
|||||||
data: [],
|
data: [],
|
||||||
}); // To Hold the array of country getUserCountry returns
|
}); // 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({
|
let [requestStatus, setRequestStatus] = useState({
|
||||||
loading: false,
|
loading: false,
|
||||||
status: false,
|
status: false,
|
||||||
@@ -123,8 +133,8 @@ function AddJob() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setPageLoading(false);
|
|
||||||
getUserCountry();
|
getUserCountry();
|
||||||
|
setPageLoading(false);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return pageLoading.loading ? (
|
return pageLoading.loading ? (
|
||||||
@@ -173,6 +183,7 @@ function AddJob() {
|
|||||||
<select
|
<select
|
||||||
id="country"
|
id="country"
|
||||||
name="country"
|
name="country"
|
||||||
|
disabled
|
||||||
value={props.values.country}
|
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`}
|
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}
|
onChange={props.handleChange}
|
||||||
@@ -223,7 +234,7 @@ function AddJob() {
|
|||||||
inputBg="bg-slate-100"
|
inputBg="bg-slate-100"
|
||||||
type="number"
|
type="number"
|
||||||
name="price"
|
name="price"
|
||||||
// placeholder="Please Enter Amount"
|
placeholder="0"
|
||||||
value={props.values.price}
|
value={props.values.price}
|
||||||
inputHandler={props.handleChange}
|
inputHandler={props.handleChange}
|
||||||
blurHandler={props.handleBlur}
|
blurHandler={props.handleBlur}
|
||||||
|
|||||||
Reference in New Issue
Block a user