socket.io works

This commit is contained in:
Gavin McDonald
2025-04-09 10:58:46 -04:00
parent a7708b4fad
commit c36d3b9981
8 changed files with 502 additions and 40 deletions

24
app/page.tsx Normal file
View File

@@ -0,0 +1,24 @@
'use client';
import { useRouter } from 'next/navigation';
//import generateID from '@/tools/simpleID';
export default function Home() {
const router = useRouter();
const handleCreateGame = () => {
const id = 'abc123'; //generateID();
router.push(`/${id}`);
};
return (
<main className="min-h-screen flex items-center justify-center">
<button
onClick={handleCreateGame}
className="bg-blue-600 text-white text-lg px-6 py-3 rounded-xl shadow hover:bg-blue-700 transition"
>
Create New Game
</button>
</main>
);
}