lets fuckin go

This commit is contained in:
2025-08-07 22:44:19 -04:00
parent a90a914d2f
commit 9d4b17b762
18 changed files with 271 additions and 49 deletions

View File

@@ -0,0 +1,4 @@
import { hc } from "hono/client";
import { type ApiType } from "../../server/src/api";
export default hc<ApiType>("http://localhost:5001/api");

View File

@@ -1,7 +1,9 @@
import "./app.css";
import "./style.css";
import { Route, Router } from "@solidjs/router";
import { Suspense } from "solid-js";
import { lazy, Suspense } from "solid-js";
import pkg from "../package.json";
import { render } from "solid-js/web";
import Root from "./routes/index";
const Version = () => (
<div class="full free clear">
@@ -19,17 +21,21 @@ const Version = () => (
</div>
);
export default function App() {
return (
<Router
root={(props) => (
<>
<Suspense>{props.children}</Suspense>
<Version />
</>
)}
>
<Route path="/" component={() => "tesingt"} />
</Router>
);
}
const App = () => (
<Router
root={(props) => (
<>
<Suspense>{props.children}</Suspense>
<Version />
</>
)}
>
<Route path="/" component={lazy(() => import("./routes/index"))} />
<Route
path="/:game"
component={lazy(() => import("./routes/[game]/index"))}
/>
</Router>
);
render(App, document.getElementById("app")!);

View File

@@ -1,4 +0,0 @@
import App from "./app";
import { render } from "solid-js/web";
render(App, document.getElementById("app")!);

View File

@@ -1,14 +1,19 @@
import { A } from "@solidjs/router";
import { createResource, For } from "solid-js";
import { createEffect, createResource, For } from "solid-js";
import * as Games from "../db/Games";
import api from "../api";
export default () => {
const [games] = createResource(() => Games.queryAll());
const [ping] = createResource(async () =>
api.ping.$get().then(async (res) => await res.text())
);
return (
<div style={{ padding: "20px" }}>
<For each={games()}>
{ping()}
{/* <For each={games()}>
{(game) => <A href={`/${game.name}`}>{game.name}</A>}
</For>
</For> */}
</div>
);
};