Add React frontend and clean up legacy HTTP backend

This commit is contained in:
tim
2026-06-15 22:20:56 +02:00
parent b8e2d15e27
commit beaf142ee4
40 changed files with 8328 additions and 437 deletions
+26
View File
@@ -0,0 +1,26 @@
import type { StashData } from '../types';
import CardView from './CardView';
interface Props {
stash: StashData | null;
}
export default function Trick({ stash }: Props) {
const cards = stash
? [0, 1, 2, 3]
.map((i) => (stash.first_player + i) % 4)
.map((order) => stash.cards[String(order)])
.filter(Boolean)
: [];
return (
<div className="bg-green-900/60 rounded-xl p-4">
<p className="text-xs text-green-300 mb-3 text-center">Aktualny stich</p>
<div className="flex gap-3 justify-center min-h-28">
{cards.map((card, i) => (
<CardView key={i} card={card} size="lg" />
))}
</div>
</div>
);
}