game systems: game system pages, game system create

components: moved DevTool to client component
This commit is contained in:
2024-03-19 11:20:15 -06:00
parent 50e5ff0663
commit 56f0442d33
10 changed files with 200 additions and 21 deletions

View File

@@ -0,0 +1,49 @@
import { Sticky } from "@/lib/sticky";
import { prisma } from "@/prisma/prismaClient";
export default async function GameSystem(
{ params: { id } }: { params: { id: string } },
) {
if (!id) throw "HOW DID YOU GET HERE?";
const gameSystem = await prisma.gameSystem.findFirst({
where: {
id,
},
select: {
id: true,
name: true,
schemas: {
select: {
name: true,
id: true,
publications: {
select: {
name: true,
id: true,
},
},
},
},
},
});
return (
<>
<section className="heading">
<h2 className="strapline">Game System</h2>
<h1>{gameSystem?.name}</h1>
</section>
<section>
<ul>
{gameSystem?.schemas.map((schema) => (
<li key={schema.id}>{schema.name}</li>
))}
</ul>
</section>
<Sticky sidedness={-1}>
<h1>HELLO!</h1>
</Sticky>
</>
);
}