Files
games/src/routes/index.tsx
2025-08-04 00:16:33 -04:00

16 lines
431 B
TypeScript

import { A } from "@solidjs/router";
import Game from "../components/Game";
import { createResource, For } from "solid-js";
import { db } from "../db";
export default () => {
const [games] = createResource(() => db().then((data) => data.games));
return (
<div style={{ padding: "20px" }}>
<For each={Object.entries(games() ?? {})}>
{([gameId, game]) => <A href={`/${gameId}`}>{game.name}</A>}
</For>
</div>
);
};