Fix stuff

This commit is contained in:
Joey Yakimowich-Payne 2026-01-14 09:07:20 -07:00
commit 32696ad33d
No known key found for this signature in database
GPG key ID: 6BFE655FA5ABD1E1
13 changed files with 2194 additions and 110 deletions

View file

@ -1,7 +1,7 @@
import React from 'react';
import { Player } from '../types';
import { motion, AnimatePresence } from 'framer-motion';
import { Sparkles, User } from 'lucide-react';
import { Sparkles, User, X } from 'lucide-react';
import { PlayerAvatar } from './PlayerAvatar';
interface LobbyProps {
@ -10,9 +10,10 @@ interface LobbyProps {
gamePin: string | null;
role: 'HOST' | 'CLIENT';
onStart: () => void;
onEndGame?: () => void;
}
export const Lobby: React.FC<LobbyProps> = ({ quizTitle, players, gamePin, role, onStart }) => {
export const Lobby: React.FC<LobbyProps> = ({ quizTitle, players, gamePin, role, onStart, onEndGame }) => {
const isHost = role === 'HOST';
const realPlayers = players.filter(p => p.id !== 'host');
@ -71,8 +72,17 @@ export const Lobby: React.FC<LobbyProps> = ({ quizTitle, players, gamePin, role,
<motion.div
initial={{ y: 50, opacity: 0 }}
animate={{ y: 0, opacity: 1 }}
className="fixed bottom-8"
className="fixed bottom-8 flex gap-4"
>
{onEndGame && (
<button
onClick={onEndGame}
className="bg-white/20 text-white px-8 py-5 rounded-full text-xl font-bold hover:bg-white/30 active:scale-95 transition-all flex items-center gap-2"
>
<X size={24} />
End Game
</button>
)}
<button
onClick={onStart}
disabled={realPlayers.length === 0}