Changed fetch response.
This commit is contained in:
@@ -10,7 +10,7 @@ export function useCountryNames(locale: string) {
|
||||
const [list, setList] = useState(countryNames[locale] || enUS);
|
||||
|
||||
async function loadData(locale: string) {
|
||||
const data = await httpGet(`${process.env.basePath || ''}/intl/country/${locale}.json`);
|
||||
const { data } = await httpGet(`${process.env.basePath || ''}/intl/country/${locale}.json`);
|
||||
|
||||
if (data) {
|
||||
countryNames[locale] = data;
|
||||
|
||||
Reference in New Issue
Block a user