Fix syntax error in leaderboard activity display

Correct a bracket mismatch in the Activity.tsx file's LeaderboardTab component to resolve a build error.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9203795e-937a-4306-b81d-b4d5c78c240e
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 32c1f264-06ed-472b-9efb-fdb65143367f
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7c94b7a0-29c7-4f2e-94ef-44b2153872b7/9203795e-937a-4306-b81d-b4d5c78c240e/VksTkSz
Replit-Helium-Checkpoint-Created: true
This commit is contained in:
sirpiglr 2025-12-13 08:37:42 +00:00
parent 4b3661e861
commit d7b46dc222

View file

@ -416,41 +416,40 @@ function LeaderboardTab({ openExternalLink, currentUserId }: { openExternalLink:
)} )}
{leaderboard.map((entry, index) => ( {leaderboard.map((entry, index) => (
<motion.div <motion.div
key={entry.user_id} key={entry.user_id}
initial={{ opacity: 0, x: -10 }} initial={{ opacity: 0, x: -10 }}
animate={{ opacity: 1, x: 0 }} animate={{ opacity: 1, x: 0 }}
transition={{ delay: index * 0.05 }} transition={{ delay: index * 0.05 }}
className={`p-3 rounded-xl flex items-center gap-3 border ${ className={`p-3 rounded-xl flex items-center gap-3 border ${
index < 3 index < 3
? "bg-gradient-to-r from-[#232428] to-[#2b2d31] border-[#4e5058]" ? "bg-gradient-to-r from-[#232428] to-[#2b2d31] border-[#4e5058]"
: "bg-[#1e1f22] border-[#3f4147]" : "bg-[#1e1f22] border-[#3f4147]"
}`} }`}
> >
<span className="w-8 text-center text-lg">{medals[index] || `#${index + 1}`}</span> <span className="w-8 text-center text-lg">{medals[index] || `#${index + 1}`}</span>
{entry.avatar_url ? ( {entry.avatar_url ? (
<img src={entry.avatar_url} alt="" className="w-8 h-8 rounded-full" /> <img src={entry.avatar_url} alt="" className="w-8 h-8 rounded-full" />
) : ( ) : (
<div className="w-8 h-8 rounded-full bg-[#5865f2] flex items-center justify-center text-white text-xs font-bold"> <div className="w-8 h-8 rounded-full bg-[#5865f2] flex items-center justify-center text-white text-xs font-bold">
{entry.username?.[0]?.toUpperCase() || "?"} {entry.username?.[0]?.toUpperCase() || "?"}
</div>
)}
<div className="flex-1 min-w-0">
<p className="text-white text-sm font-medium truncate">{entry.username}</p>
<p className="text-[#949ba4] text-xs">Lvl {entry.level} · {entry.total_xp.toLocaleString()} XP</p>
</div> </div>
{entry.current_streak && entry.current_streak > 0 && ( )}
<motion.span <div className="flex-1 min-w-0">
animate={{ scale: [1, 1.1, 1] }} <p className="text-white text-sm font-medium truncate">{entry.username}</p>
transition={{ repeat: Infinity, duration: 2 }} <p className="text-[#949ba4] text-xs">Lvl {entry.level} · {entry.total_xp.toLocaleString()} XP</p>
className="flex items-center gap-1 text-orange-400 text-xs font-medium" </div>
> {entry.current_streak && entry.current_streak > 0 && (
<Flame className="w-3.5 h-3.5" />{entry.current_streak} <motion.span
</motion.span> animate={{ scale: [1, 1.1, 1] }}
)} transition={{ repeat: Infinity, duration: 2 }}
</motion.div> className="flex items-center gap-1 text-orange-400 text-xs font-medium"
) >
)} <Flame className="w-3.5 h-3.5" />{entry.current_streak}
</motion.span>
)}
</motion.div>
))}
<button onClick={() => openExternalLink(`${APP_URL}/leaderboard`)} className="w-full py-2 text-purple-400 text-sm hover:underline flex items-center justify-center gap-1"> <button onClick={() => openExternalLink(`${APP_URL}/leaderboard`)} className="w-full py-2 text-purple-400 text-sm hover:underline flex items-center justify-center gap-1">
Full leaderboard <ExternalLink className="w-3 h-3" /> Full leaderboard <ExternalLink className="w-3 h-3" />
</button> </button>