result_list array as list of countries
This commit was merged in pull request #531.
This commit is contained in:
@@ -42,16 +42,16 @@ export default function MyJobTable({ MyJobList, reloadJobList, className }) {
|
||||
|
||||
// Get Country Api
|
||||
const getCountryList = useCallback(async () => {
|
||||
const res = await userApi.getSignupCountryData();
|
||||
|
||||
|
||||
try {
|
||||
if (res.status === 200) {
|
||||
const res = await userApi.getSignupCountryData();
|
||||
if (res.status === 200 && res.data.internal_return >= 0) {
|
||||
const {
|
||||
data: { signup_country },
|
||||
data: { result_list },
|
||||
} = await res;
|
||||
let checkCountry = signup_country
|
||||
?.filter((item) => item[0] == country)
|
||||
?.map((item, idx) => item[1])
|
||||
let checkCountry = result_list
|
||||
?.filter((item) => item.code == country)
|
||||
?.map((item) => item.country)
|
||||
.join("");
|
||||
setCountries(checkCountry);
|
||||
}
|
||||
@@ -59,7 +59,7 @@ export default function MyJobTable({ MyJobList, reloadJobList, className }) {
|
||||
throw new Error(error);
|
||||
}
|
||||
}, [userApi, country]);
|
||||
|
||||
console.log('MY COUNTRY', myCountry)
|
||||
useEffect(() => {
|
||||
getCountryList();
|
||||
}, [getCountryList]);
|
||||
|
||||
Reference in New Issue
Block a user