Updated handling of env vars.

This commit is contained in:
Mike Cao committed 2024-05-12 23:15:49 -07:00
1 parent f42a99cf7e
commit 98a0a83ccf
13 files changed
+29 -25

No files matched your search

+1 -1
View File
@@ -10,7 +10,7 @@ export function useLanguageNames(locale) {
const [list, setList] = useState(languageNames[locale] || enUS);
async function loadData(locale) {
const { data } = await httpGet(`${process.env.basePath}/intl/language/${locale}.json`);
const { data } = await httpGet(`${process.env.basePath || ''}/intl/language/${locale}.json`);
if (data) {
languageNames[locale] = data;