mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-25 19:49:50 +01:00
feat: custom components
This commit is contained in:
1 parent
bc6bb4f10e
commit
69b13fd33a
9 files changed
+164
-58
No files matched your search
@@ -1,14 +0,0 @@
|
||||
import locales from '@blitzkit/i18n/locales.json' with { type: 'json' };
|
||||
import type { APIRoute, GetStaticPaths, GetStaticPathsItem } from 'astro';
|
||||
import { getStrings } from 'packages/website-ue/src/core/i18n/getStrings';
|
||||
|
||||
export const getStaticPaths: GetStaticPaths = () => {
|
||||
return locales.supported.map(
|
||||
({ locale }) => ({ params: { locale } }) satisfies GetStaticPathsItem,
|
||||
);
|
||||
};
|
||||
|
||||
export const GET: APIRoute = async ({ params, request }) => {
|
||||
const strings = await getStrings(params.locale!);
|
||||
return Response.json(strings);
|
||||
};
|
||||
Reference in new issue
Block a user