redo of entire app

This commit is contained in:
bobbert committed 2025-03-11 16:22:47 +00:00
1 parent 7dee4879a7
commit 093dd7ea9e
45 files changed
+686 -5659

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
import { query } from '../../../lib/db';
export default async function Stats({ params }) {
const { teamId } = params;
// Fetch team and clues from the database
const team = await query('SELECT * FROM teams WHERE id = ?', [teamId]);
const clues = await query('SELECT * FROM clues WHERE team_id = ?', [teamId]);
return (
<div>
<h1>Stats for {team.name}</h1>
<p>Team Code: {team.code}</p>
<h2>Clues</h2>
<ul>
{clues.map((clue) => (
<li key={clue.id}>
{clue.description} - {clue.found ? 'Found' : 'Not Found'}
</li>
))}
</ul>
</div>
);
}