From e1b1c3a1b59c168a313340b9b8b7195c32550921 Mon Sep 17 00:00:00 2001 From: Byron Wall Date: Mon, 25 Sep 2023 00:02:00 -0400 Subject: [PATCH] Only show new award images (#88) Only show images when unclaimed awards exist Commonize on a grid layout for all displays --- src/app/awards/page.tsx | 58 ++++++++++++++------------- src/server/api/routers/awardRouter.ts | 25 ++++++++++-- 2 files changed, 53 insertions(+), 30 deletions(-) diff --git a/src/app/awards/page.tsx b/src/app/awards/page.tsx index 4a482a1..ff25928 100644 --- a/src/app/awards/page.tsx +++ b/src/app/awards/page.tsx @@ -69,42 +69,34 @@ export default function AwardsPage() {

Current word count: {currentWordCount}

Next award at: {nextWordAward}

-
- {wordCountAwards?.map((award) => ( - - ))} -
+

Sentence count awards

Current sentence count: {currentSentenceCount}

Next award at: {nextSentenceAward}

-
- {sentenceCountAwards?.map((award) => ( - - ))} -
+

Word mastery awards

-
- {wordMasteryAwards?.map((award) => ( - - ))} -
- -

Award images

- -
- {(allAwardImages ?? []).map((image) => ( - - ))} -
+ + + {hasUnclaimedAwards && ( + <> +

Award images

+ +
+ {(allAwardImages ?? []).map((image) => ( + + ))} +
+ + )}