add routing links

This commit is contained in:
2025-07-08 21:10:00 +02:00
parent 3c02ec930b
commit 6b75e787c4
4 changed files with 96 additions and 14 deletions
+4 -6
View File
@@ -3,6 +3,7 @@ import { useState, useEffect } from "react";
import { Markazi_Text, Nunito } from "next/font/google";
import users from "muzak/data/users.json";
import Image from "next/image";
import Link from "next/link";
const nunito = Nunito({
weight: "900",
@@ -52,14 +53,12 @@ export default function Lobby() {
<div className="text-3xl font-bold text-yellow-500">
Players: {partySize}
</div>
<button
<Link
href="/voting"
className="rounded-lg border-2 border-black bg-yellow-500 p-4 text-2xl font-extrabold text-blue-600 hover:bg-yellow-400"
onClick={() =>
console.log(`Start game with ${partySize} players:`, userList)
}
>
START
</button>
</Link>
</div>
{partySize === 0 ? (
@@ -67,7 +66,6 @@ export default function Lobby() {
Waiting for players...
</div>
) : (
// <div className="grid min-w-52 grid-flow-col grid-cols-2 grid-rows-4 items-start justify-start gap-4">
<div className="grid min-w-52 grid-flow-row grid-cols-2 items-start justify-start gap-4">
{userList.map((user) => (
<div