feat: translate gallery

This commit is contained in:
tresabhi committed 2025-01-07 13:00:43 -06:00
1 parent 9de41529d1
commit 6b2dda0f9d
8 files changed
+52 -38

No files matched your search

@@ -1,6 +1,10 @@
import { assertSecret, type BlitzGlossary } from '@blitzkit/core';
export async function fetchGlossary() {
const response = await fetch(assertSecret(import.meta.env.WOTB_GLOSSARY));
export async function fetchGlossary(locale: string) {
const response = await fetch(
`${assertSecret(
import.meta.env.WOTB_GLOSSARY_DOMAIN,
)}/${locale}${assertSecret(import.meta.env.WOTB_GLOSSARY_PATH)}`,
);
return (await response.json()) as BlitzGlossary;
}