feat: string hooks

This commit is contained in:
TrèsAbhi committed 2026-01-13 20:15:55 -06:00
1 parent f5f3f70e35
commit 27abf1b0de
7 files changed
+82 -12

No files matched your search

@@ -1,4 +1,5 @@
import { fetchPB } from "@blitzkit/core";
import type { Strings } from "@blitzkit/i18n";
import { Avatars } from "../../protos/avatars";
import { AbstractAPI } from "./abstract";
@@ -29,4 +30,11 @@ export class ClientAPI extends AbstractAPI {
return strings;
}
protected async _strings(locale: string) {
const response = await fetch(`/api/strings/${locale}.json`);
const json = (await response.json()) as Strings;
return json;
}
}