mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-24 18:26:20 +01:00
Fixed method.
This commit is contained in:
parent
fc943b729c
commit
80d3bf6ab3
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user