cooking with websockets
This commit is contained in:
@@ -34,30 +34,33 @@ const Profile = () => {
|
||||
);
|
||||
};
|
||||
|
||||
const App = () => (
|
||||
<Router
|
||||
root={(props) => (
|
||||
<>
|
||||
<Suspense>{props.children}</Suspense>
|
||||
<Profile />
|
||||
const App = () => {
|
||||
api.whoami.post();
|
||||
return (
|
||||
<Router
|
||||
root={(props) => (
|
||||
<>
|
||||
<Suspense>{props.children}</Suspense>
|
||||
<Profile />
|
||||
|
||||
{/* Version */}
|
||||
<span class="fixed br m-2 font-mono text-xs">
|
||||
{"v" + pkg.version}
|
||||
</span>
|
||||
</>
|
||||
)}
|
||||
>
|
||||
<Route path="/" component={lazy(() => import("./routes/index"))} />
|
||||
<Route
|
||||
path="/:game"
|
||||
component={lazy(() => import("./routes/[game]/index"))}
|
||||
/>
|
||||
<Route
|
||||
path="/:game/:instance"
|
||||
component={lazy(() => import("./routes/[game]/[instance]"))}
|
||||
/>
|
||||
</Router>
|
||||
);
|
||||
{/* Version */}
|
||||
<span class="fixed br m-2 font-mono text-xs">
|
||||
{"v" + pkg.version}
|
||||
</span>
|
||||
</>
|
||||
)}
|
||||
>
|
||||
<Route path="/" component={lazy(() => import("./routes/index"))} />
|
||||
<Route
|
||||
path="/:game"
|
||||
component={lazy(() => import("./routes/[game]/index"))}
|
||||
/>
|
||||
<Route
|
||||
path="/:game/:instance"
|
||||
component={lazy(() => import("./routes/[game]/[instance]"))}
|
||||
/>
|
||||
</Router>
|
||||
);
|
||||
};
|
||||
|
||||
api.whoami.post().then(() => render(App, document.getElementById("app")!));
|
||||
render(App, document.getElementById("app")!);
|
||||
|
||||
Reference in New Issue
Block a user