Skip to content

Commit 9c32428

Browse files
committed
update
1 parent d841671 commit 9c32428

File tree

1 file changed

+34
-7
lines changed

1 file changed

+34
-7
lines changed

frontend/src/pages/Dashboard/ChallengesList.jsx

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -207,13 +207,22 @@ export default function ChallengesList() {
207207
{/* Challenge Header */}
208208
<div className="flex justify-between items-start mb-4">
209209
<div>
210-
<span
211-
className={`inline-block px-3 py-1 rounded-full text-xs font-medium text-white mb-2 ${getChallengeTypeStyle(
212-
challenge.tag
213-
)}`}
214-
>
215-
{challenge.tag}
216-
</span>
210+
<div className="flex flex-wrap gap-2 mb-2">
211+
<span
212+
className={`inline-block px-3 py-1 rounded-full text-xs font-medium text-white ${getChallengeTypeStyle(
213+
challenge.tag
214+
)}`}
215+
>
216+
{challenge.tag}
217+
</span>
218+
219+
{/* Bonus Points Indicator */}
220+
{challenge.bonusPoints > 0 && challenge.bonusLimit > 0 && challenge.approvedSubmissionsCount < challenge.bonusLimit && (
221+
<span className="inline-block px-3 py-1 rounded-full text-xs font-medium bg-gradient-to-r from-amber-500/20 to-yellow-500/20 text-yellow-400">
222+
+{challenge.bonusPoints} Bonus
223+
</span>
224+
)}
225+
</div>
217226
<h3 className="text-xl font-semibold text-white mb-2">
218227
{challenge.title}
219228
</h3>
@@ -231,6 +240,24 @@ export default function ChallengesList() {
231240
</div>
232241
</div>
233242

243+
{/* Dependencies */}
244+
{/* Points Display */}
245+
<div className="mb-4">
246+
<div className="flex items-center text-white">
247+
<svg className="w-5 h-5 mr-2 text-purple-400" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
248+
<path d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"></path>
249+
</svg>
250+
<span className="font-medium">{challenge.points || 0} points</span>
251+
252+
{challenge.bonusPoints > 0 && challenge.bonusLimit > 0 && (
253+
<div className="ml-4 text-xs text-gray-400">
254+
<span className="text-yellow-400">{challenge.approvedSubmissionsCount || 0}</span>
255+
<span>/{challenge.bonusLimit} bonus claims used</span>
256+
</div>
257+
)}
258+
</div>
259+
</div>
260+
234261
{/* Dependencies */}
235262
<div className="mb-4">
236263
<div className="flex flex-wrap gap-2">

0 commit comments

Comments
 (0)