Updated handling of env vars.

This commit is contained in:
Mike Cao 2024-05-12 23:15:49 -07:00
parent f42a99cf7e
commit 98a0a83ccf
13 changed files with 29 additions and 25 deletions

View file

@ -19,7 +19,9 @@ export function useLocale() {
const dateLocale = getDateLocale(locale);
async function loadMessages(locale: string) {
const { ok, data } = await httpGet(`${process.env.basePath}/intl/messages/${locale}.json`);
const { ok, data } = await httpGet(
`${process.env.basePath || ''}/intl/messages/${locale}.json`,
);
if (ok) {
messages[locale] = data;