This commit is contained in:
2023-10-25 11:34:02 +08:00
parent 717c76f4dd
commit 2e8e8e008c
7 changed files with 254 additions and 71 deletions

View File

@@ -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);