mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-11 13:56:16 +00:00
feat: parse locale before ww init
This commit is contained in:
@@ -120,11 +120,16 @@ export function App() {
|
||||
async (token?: string, locale?: string) => {
|
||||
if (wokwondersRef.current) return;
|
||||
|
||||
const possibleLocales = ["en", "pt", "ru"];
|
||||
|
||||
const parsedLocale =
|
||||
possibleLocales.find((l) => l === locale?.slice(0, 2)) ?? "en";
|
||||
|
||||
wokwondersRef.current = new WorkWondersSdk();
|
||||
await wokwondersRef.current.init({
|
||||
organization: "hydra",
|
||||
token,
|
||||
locale,
|
||||
locale: parsedLocale,
|
||||
});
|
||||
|
||||
await wokwondersRef.current.initChangelogWidget();
|
||||
|
||||
Reference in New Issue
Block a user