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

+21
View File
@@ -0,0 +1,21 @@
import { query } from '../../../lib/db';
import { useSession } from 'next-auth/react';
export default async function Progress() {
const { data: session } = useSession();
// Fetch progress from the database
const progress = await query(
'SELECT COUNT(*) as found FROM clues WHERE found = TRUE AND team_id = ?',
[session.user.teamId]
);
const remaining = 20 - progress.found;
return (
<div>
<h1>Progress</h1>
<p>Clues Found: {progress.found}</p>
<p>Clues Remaining: {remaining}</p>
</div>
);
}