Rebrand to kaboot

This commit is contained in:
Joey Yakimowich-Payne 2026-01-13 10:59:50 -07:00
commit 8a8ec9bc0e
No known key found for this signature in database
GPG key ID: DDF6AF5B21B407D4
8 changed files with 59 additions and 27 deletions

View file

@ -8,10 +8,15 @@ interface ScoreboardProps {
players: Player[];
onNext: () => void;
isHost: boolean;
currentPlayerId: string | null;
}
export const Scoreboard: React.FC<ScoreboardProps> = ({ players, onNext, isHost }) => {
const sortedPlayers = [...players].sort((a, b) => b.score - a.score).slice(0, 5);
export const Scoreboard: React.FC<ScoreboardProps> = ({ players, onNext, isHost, currentPlayerId }) => {
const playersWithDisplayName = players.map(p => ({
...p,
displayName: p.id === currentPlayerId ? `${p.name} (You)` : p.name
}));
const sortedPlayers = [...playersWithDisplayName].sort((a, b) => b.score - a.score).slice(0, 5);
return (
<div className="flex flex-col h-screen p-8">
@ -29,7 +34,7 @@ export const Scoreboard: React.FC<ScoreboardProps> = ({ players, onNext, isHost
<XAxis type="number" hide />
<YAxis
type="category"
dataKey="name"
dataKey="displayName"
tick={{ fontSize: 24, fontWeight: 800, fill: '#333', fontFamily: 'Fredoka' }}
width={200}
tickLine={false}
@ -39,7 +44,7 @@ export const Scoreboard: React.FC<ScoreboardProps> = ({ players, onNext, isHost
{sortedPlayers.map((entry, index) => (
<Cell
key={`cell-${index}`}
fill={entry.id.startsWith('host') ? '#46178f' : '#8884d8'}
fill={entry.color}
className="filter drop-shadow-md"
/>
))}