mirror of
https://github.com/gogs/gogs.git
synced 2026-05-28 21:30:36 +00:00
19 lines
464 B
TypeScript
19 lines
464 B
TypeScript
import { createRoot } from "react-dom/client";
|
|
|
|
import { App } from "./App";
|
|
import { UserInfoProvider } from "./components/UserInfoProvider";
|
|
import "./index.css";
|
|
import "./lib/i18n";
|
|
import { fetchUserInfo } from "./lib/user-info";
|
|
|
|
const userInfo = await fetchUserInfo();
|
|
|
|
const root = document.getElementById("root");
|
|
if (root) {
|
|
createRoot(root).render(
|
|
<UserInfoProvider value={userInfo}>
|
|
<App user={userInfo} />
|
|
</UserInfoProvider>,
|
|
);
|
|
}
|