Refactored localization files.

This commit is contained in:
Mike Cao 2022-03-18 19:17:23 -07:00
parent 7c2b687350
commit f24696de5a
124 changed files with 18 additions and 18 deletions

View file

@ -1,7 +1,7 @@
import { useState, useEffect } from 'react';
import { useRouter } from 'next/router';
import { get } from 'lib/web';
import enUS from 'public/country/en-US.json';
import enUS from 'public/intl/country/en-US.json';
const countryNames = {
'en-US': enUS,
@ -12,7 +12,7 @@ export default function useCountryNames(locale) {
const { basePath } = useRouter();
async function loadData(locale) {
const { ok, data } = await get(`${basePath}/country/${locale}.json`);
const { ok, data } = await get(`${basePath}/intl/country/${locale}.json`);
if (ok) {
countryNames[locale] = data;