From d17a5adc5bed08a414e67b84f491463c90955d15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20S=C3=A1nchez?= Date: Fri, 6 Sep 2024 16:03:38 +0200 Subject: [PATCH] Prize distribution, finalist --- packages/nextjs/app/submissions/page.tsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/nextjs/app/submissions/page.tsx b/packages/nextjs/app/submissions/page.tsx index cbf2f84..da66acb 100644 --- a/packages/nextjs/app/submissions/page.tsx +++ b/packages/nextjs/app/submissions/page.tsx @@ -20,14 +20,24 @@ const Submissions: NextPage = async () => { ? submission.votes.map(vote => vote.score).reduce((a, b) => a + b, 0) / submission.votes.length : 0; - const winnerTag = avgScore >= winnersThreshold ? "Winner" : avgScore >= runnersUpThreshold ? "Runner Up" : null; + const winnerTag = avgScore >= winnersThreshold ? "Winner" : avgScore >= runnersUpThreshold ? "Finalist" : null; return { ...submission, avgScore, winnerTag }; }) .sort((a, b) => b.avgScore - a.avgScore); return ( -
+
+

🏆 Prize Distribution

+
    +
  • + Winner: $1000 +
  • +
  • + Finalist: $500 +
  • +
+
{submissions.length === 0 && (