1
0
Fork 0

Use of Server Components for easier Data fetching + start use of v2 API

This commit is contained in:
Neshura 2023-06-10 16:14:53 +02:00
parent 49ceda5575
commit f23c9dc0f1
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C
6 changed files with 195 additions and 5 deletions

View file

@ -1,12 +1,14 @@
'use client';
import '@/app/globals.css';
import { Game, GameGroup } from '@/types/stellaris';
import { GameView } from '@/components/gui/game-view';
import { generateUrl } from '@/components/server/fetchers';
export default async function Home() {
const games = await fetch(generateUrl('/games')).then((res) => res.json())
export default function Home() {
return (
<main>
<div>
<p>Empire Overview goes here evenutally</p>
</div>
<GameView games={games}/>
</main>
)
}