Updated settings components and date filter.
This commit is contained in:
1 parent
70ef857dc7
commit
4b5b4db108
16 files changed
+172
-194
No files matched your search
@@ -12,9 +12,9 @@ export default function useCountryNames(locale) {
|
||||
const { basePath } = useRouter();
|
||||
|
||||
async function loadData(locale) {
|
||||
const { ok, data } = await get(`${basePath}/intl/country/${locale}.json`);
|
||||
const data = await get(`${basePath}/intl/country/${locale}.json`);
|
||||
|
||||
if (ok) {
|
||||
if (data) {
|
||||
countryNames[locale] = data;
|
||||
setList(countryNames[locale]);
|
||||
} else {
|
||||
|
||||
@@ -12,9 +12,9 @@ export default function useLanguageNames(locale) {
|
||||
const { basePath } = useRouter();
|
||||
|
||||
async function loadData(locale) {
|
||||
const { ok, data } = await get(`${basePath}/intl/language/${locale}.json`);
|
||||
const data = await get(`${basePath}/intl/language/${locale}.json`);
|
||||
|
||||
if (ok) {
|
||||
if (data) {
|
||||
languageNames[locale] = data;
|
||||
setList(languageNames[locale]);
|
||||
} else {
|
||||
|
||||
+2
-2
@@ -21,9 +21,9 @@ export default function useLocale() {
|
||||
const dateLocale = getDateLocale(locale);
|
||||
|
||||
async function loadMessages(locale) {
|
||||
const { ok, data } = await get(`${basePath}/intl/messages/${locale}.json`);
|
||||
const data = await get(`${basePath}/intl/messages/${locale}.json`);
|
||||
|
||||
if (ok) {
|
||||
if (data) {
|
||||
messages[locale] = data;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user