game systems: game system pages, game system create
components: moved DevTool to client component
This commit is contained in:
49
app/game-systems/[id]/page.tsx
Normal file
49
app/game-systems/[id]/page.tsx
Normal 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>
|
||||
</>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user