fix style
This commit is contained in:
@@ -196,9 +196,31 @@ export default function ChallengeDetail() {
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div style={{ display: 'grid', gap: '2rem', gridTemplateColumns: 'minmax(0, 1fr) 300px' }}>
|
||||
{/* Leaderboard - Desktop: Sidebar, Mobile: Top */}
|
||||
<div className="card" style={{ marginBottom: '2rem' }} id="leaderboard-mobile">
|
||||
<h3 style={{ marginBottom: '1rem' }}>Leaderboard</h3>
|
||||
{leaderboard.length === 0 ? (
|
||||
<p style={{ color: 'var(--text-muted)', fontSize: '0.875rem' }}>No points yet</p>
|
||||
) : (
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: '0.75rem' }}>
|
||||
{leaderboard.map((entry, index) => (
|
||||
<div key={entry.id} style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||
<div>
|
||||
<span style={{ marginRight: '0.5rem', color: 'var(--text-muted)' }}>{index + 1}.</span>
|
||||
<strong>{entry.username}</strong>
|
||||
</div>
|
||||
<span style={{ color: 'var(--primary)', fontWeight: 600 }}>
|
||||
{entry.validated_points} pts
|
||||
</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="challenge-detail-layout">
|
||||
{/* Main Content */}
|
||||
<div>
|
||||
<div className="challenge-main">
|
||||
{/* New Prediction */}
|
||||
<div className="card" style={{ marginBottom: '2rem' }}>
|
||||
<h3 style={{ marginBottom: '1rem' }}>Make a Prediction</h3>
|
||||
@@ -272,8 +294,8 @@ export default function ChallengeDetail() {
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Sidebar - Leaderboard */}
|
||||
<div>
|
||||
{/* Sidebar - Leaderboard (Desktop only) */}
|
||||
<div className="challenge-sidebar">
|
||||
<div className="card">
|
||||
<h3 style={{ marginBottom: '1rem' }}>Leaderboard</h3>
|
||||
{leaderboard.length === 0 ? (
|
||||
|
||||
Reference in New Issue
Block a user