Fixed method.

This commit is contained in:
Mike Cao 2023-07-11 19:28:01 -07:00
parent fc943b729c
commit 80d3bf6ab3

View File

@ -1,6 +1,6 @@
import { useState, useEffect } from 'react';
import { useRouter } from 'next/router';
import { get } from 'next-basics';
import { httpGet } from 'next-basics';
import enUS from 'public/intl/language/en-US.json';
const languageNames = {
@ -12,7 +12,7 @@ export function useLanguageNames(locale) {
const { basePath } = useRouter();
async function loadData(locale) {
const data = await get(`${basePath}/intl/language/${locale}.json`);
const { data } = await httpGet(`${basePath}/intl/language/${locale}.json`);
if (data) {
languageNames[locale] = data;