export const validLocales = ["de"]; /** * Used to grab the correct locales data. * @param {string | undefined} locale - The locale * @return {Promise | null>} The locale data. */ export default async function getLocales( locale: string | undefined, ): Promise | null> { if (locale === "en" || !validLocales.includes(String(locale))) { return null; } return JSON.parse(JSON.stringify(await import(`./${locale}.json`))); }