diff --git a/frontend/src/tools/schocken.jsx b/frontend/src/tools/schocken.jsx index 840cda0..1d23715 100644 --- a/frontend/src/tools/schocken.jsx +++ b/frontend/src/tools/schocken.jsx @@ -445,7 +445,7 @@ function NewGameModal({ onClose, onCreate, toast }) { } // ── Spielliste ──────────────────────────────────────────────────────────────── -function GameList({ games, myId, onSelect, onNew }) { +function GameList({ games, myId, onSelect, onNew, onDelete, isAdmin }) { const active = games.filter(g => g.status !== 'finished'); const finished = games.filter(g => g.status === 'finished'); @@ -456,23 +456,26 @@ function GameList({ games, myId, onSelect, onNew }) { const GameRow = ({ g }) => { const others = g.players.filter(p=>p.id!==myId).map(p=>p.username).join(', '); return ( - + + {isAdmin && ( + + )} + ); }; @@ -671,7 +674,7 @@ export default function Schocken({ toast }) { {!activeId - ? setShowNew(true)}/> + ? setShowNew(true)} onDelete={id=>setGames(prev=>prev.filter(g=>g.id!==id))} isAdmin={isAdmin}/> : game && myId ? {setTestSeat(id);}} /> :
Lade…