added LastGameCard

This commit is contained in:
Niklas Kapelle 2025-05-07 19:13:40 +02:00
parent 3640116dd5
commit 3ce3fabc81
Signed by: niklas
GPG Key ID: 4EB651B36D841D16

View File

@ -0,0 +1,43 @@
<script lang="ts">
import { link } from "@dvcol/svelte-simple-router";
let {
id,
score,
t0p0,
t0p1,
t1p0,
t1p1,
}: {
id: string;
score: number;
t0p0: string;
t0p1: string;
t1p0: string;
t1p1: string;
} = $props();
</script>
<a use:link href="/game/{id}">
<div class="flex justify-between border rounded-xl my-3">
<div class="team">
<div>{t0p0}</div>
<div>{t0p1}</div>
</div>
<div class="text-xl flex items-center">
<div>
<span class="mr-2">{score > 0 ? score : 0}</span> - <span class="ml-2">{score < 0 ? -score : 0}</span>
</div>
</div>
<div class="team">
<div>{t1p0}</div>
<div>{t1p1}</div>
</div>
</div>
</a>
<style>
.team {
@apply my-1 mx-2;
}
</style>