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

+26
View File
@@ -0,0 +1,26 @@
'use client'; // Mark as a Client Component
import { useState } from 'react';
import { useSession } from 'next-auth/react';
export default function Admin() {
const { data: session } = useSession();
const [timerStarted, setTimerStarted] = useState(false);
if (session?.user?.role !== 'admin') {
return <p>Access denied</p>;
}
const startTimer = async () => {
// Implement timer logic (e.g., update database or state)
setTimerStarted(true);
};
return (
<div>
<h1>Admin Console</h1>
<button onClick={startTimer} disabled={timerStarted}>
Start Timer
</button>
</div>
);
}