init
Deploy to GitHub Pages / build-and-deploy (push) Failing after 8m31s

This commit is contained in:
MeghdadFadaee committed 2026-07-30 15:49:04 +03:30
commit b73adb9fe3
30 files changed
+3776

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
import { ChartNoAxesColumnIncreasing, CheckCircle2, Coins, Target, Trophy } from 'lucide-react';
import type { GameStats } from '../types';
export function StatsBar({ stats }: { stats: GameStats }) {
const average = stats.gamesPlayed ? Math.round(stats.totalCoinsSelected / stats.gamesPlayed) : 0;
const winRate = stats.gamesPlayed ? Math.round((stats.gamesWon / stats.gamesPlayed) * 100) : 0;
return (
<aside className="stats-bar" aria-label="Player statistics">
<div className="stat-primary"><Trophy size={18} /><span><small>TOTAL SCORE</small><strong>{stats.score.toLocaleString()}</strong></span></div>
<div><ChartNoAxesColumnIncreasing size={17} /><span><small>PLAYED</small><strong>{stats.gamesPlayed}</strong></span></div>
<div><CheckCircle2 size={17} /><span><small>WON</small><strong>{stats.gamesWon}</strong></span></div>
<div><Target size={17} /><span><small>WIN RATE</small><strong>{winRate}%</strong></span></div>
<div><Coins size={17} /><span><small>AVG. COINS</small><strong>{average.toLocaleString()}</strong></span></div>
</aside>
);
}