+
{error}
-
+
)}
setPlayerName(e.target.value)}
- maxLength={20}
- onKeyDown={(e) => e.key === "Enter" && onCreateRoom()}
+ className="w-full min-h-11 px-3.5 bg-[#1a1a1a] border-[1.5px] border-[#2e2e2e] rounded-xl text-[#f0f0f0] text-sm outline-none focus:border-[#7c3aed] transition-colors"
+ type="text" placeholder="Ton pseudo"
+ value={playerName} onChange={(e) => setPlayerName(e.target.value)}
+ maxLength={20} onKeyDown={(e) => e.key === "Enter" && onCreateRoom()}
/>
-
- {/* Multijoueur */}
-
-
Multijoueur
+ {/* Multijoueur */}
+
+
Multijoueur
+
+ {/* Join row — colonne sur mobile, ligne sur sm+ */}
+
-
- {/* Divider */}
-
-
- {/* Solo */}
-
-
Solo
-
+
+ {/* Divider */}
+
+
+ {/* Solo */}
+
+
Solo
+
+
);
diff --git a/app/components/LeaderboardScreen.tsx b/app/components/LeaderboardScreen.tsx
index b850f31..1c73d5b 100644
--- a/app/components/LeaderboardScreen.tsx
+++ b/app/components/LeaderboardScreen.tsx
@@ -37,11 +37,7 @@ export function LeaderboardScreen({ onBack }: { onBack: () => void }) {
}, []);
const sorted = [...rows]
- .filter((r) => {
- if (mode === "solo") return r.soloGames > 0;
- if (mode === "multi") return r.multiGames > 0;
- return true;
- })
+ .filter((r) => mode === "solo" ? r.soloGames > 0 : mode === "multi" ? r.multiGames > 0 : true)
.sort((a, b) => {
if (mode === "solo") return b.soloWins - a.soloWins || b.soloGames - a.soloGames;
if (mode === "multi") return b.multiWins - a.multiWins || b.multiGames - a.multiGames;
@@ -49,24 +45,27 @@ export function LeaderboardScreen({ onBack }: { onBack: () => void }) {
});
return (
-
+
{/* Header */}
-
-