mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-12-05 15:52:55 +01:00
feat: more home page
This commit is contained in:
1 parent
44203223fd
commit
c5f5f69fd6
11 files changed
+60
-10
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import locales from "@blitzkit/i18n/locales.json";
|
||||
import type { APIContext, GetStaticPaths } from "astro";
|
||||
import { api } from "../../../core/api/dynamic";
|
||||
|
||||
export const getStaticPaths = (() => {
|
||||
return locales.supported.map(({ locale }) => ({ params: { locale } }));
|
||||
}) satisfies GetStaticPaths;
|
||||
|
||||
/**
|
||||
* BlitzKit strings.
|
||||
*/
|
||||
export async function GET({ params }: APIContext<never, { locale: string }>) {
|
||||
const strings = await api.strings(params.locale);
|
||||
return Response.json(strings);
|
||||
}
|
||||
Reference in new issue
Block a user