mirror of
https://github.com/mudabbir-ahmad/peworkshop.git
synced 2026-10-07 19:50:20 +00:00
redo of entire app
This commit is contained in:
1 parent
7dee4879a7
commit
093dd7ea9e
45 files changed
+686
-5659
No files matched your search
@@ -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>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user