something
This commit is contained in:
@@ -1,5 +1,15 @@
|
||||
import { A } from "@solidjs/router";
|
||||
import Game from "../components/Game";
|
||||
import { createResource, For } from "solid-js";
|
||||
import { db } from "../db";
|
||||
|
||||
export default () => {
|
||||
return <Game />;
|
||||
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>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user