i18n
This commit is contained in:
18
src/main.tsx
18
src/main.tsx
@@ -1,4 +1,16 @@
|
||||
import { render } from 'preact'
|
||||
import { App } from './app'
|
||||
import { render } from "preact";
|
||||
import { App } from "./app";
|
||||
import { useState } from "preact/hooks";
|
||||
import { Tr, langCodeContext, LANG_OPTIONS } from "./translate";
|
||||
|
||||
render(<App />, document.getElementById('app') as HTMLElement)
|
||||
function Base() {
|
||||
const [langCode, setLangCode] = useState("en-US");
|
||||
return (
|
||||
/* @ts-ignore */
|
||||
<langCodeContext.Provider value={{ langCode, setLangCode }}>
|
||||
<App />
|
||||
</langCodeContext.Provider>
|
||||
);
|
||||
}
|
||||
|
||||
render(<Base />, document.getElementById("app") as HTMLElement);
|
||||
|
||||
Reference in New Issue
Block a user