diff --git a/public/placeholder.jpeg b/public/placeholder.jpeg
new file mode 100644
index 0000000..bb1655c
Binary files /dev/null and b/public/placeholder.jpeg differ
diff --git a/src/app/awards/AwardCard.tsx b/src/app/awards/AwardCard.tsx
new file mode 100644
index 0000000..316a9d4
--- /dev/null
+++ b/src/app/awards/AwardCard.tsx
@@ -0,0 +1,38 @@
+"use client";
+
+import Image from "next/image";
+
+import { cn } from "~/utils";
+
+import { type Award } from "./page";
+
+export function AwardCard({ award }: { award: Award }) {
+ const label = award.awardType === "WORD_COUNT" ? "words" : "sentences";
+
+ const numberAward = (
+
+
Awards
-
-
Word count awards
-
-
Current word count: {currentWordCount}
-
Next award at: {nextWordAward}
-
-
-
-
Sentence count awards
-
-
Current sentence count: {currentSentenceCount}
-
Next award at: {nextSentenceAward}
-
-
-
-
Word mastery awards
-
-
+
+
+ Word count awards
+
+ Word count awards are given every 100 correct words.
+
+
+
+ Current word count: {currentWordCount}
+ Next award at: {nextWordAward}
+
+
+
+
+
+
+ Sentence count awards
+
+ Awards are given every 10 sentences.
+
+
+
+ Current sentence count: {currentSentenceCount}
+ Next award at: {nextSentenceAward}
+
+
+
+
+
+
+ Word mastery awards
+
+ Given when the interval on a word reaches the max: 60d.
+
+
+
+
+
+
{hasUnclaimedAwards && (
<>
-
Award images
-
-
- {(allAwardImages ?? []).map((image) => (
-
- ))}
-
+
+
+ Pick new awards
+
+ Click an image to add to your awards.
+
+
+
+ {" "}
+
+ {(allAwardImages ?? []).map((image) => (
+
+ ))}
+
+
+
>
)}
-
- );
-}
-
-function AwardCard({ award }: { award: Award }) {
- return (
-
-
{award.awardType}
-
{award.awardValue ?? 0}
- {award.word &&
{award.word.word}
}
- {award.image && (
-
- )}
-
- );
-}
-
-function AwardImageChoice({
- image,
- shouldClickToClaim,
-}: {
- image: AwardImage;
- shouldClickToClaim: boolean;
-}) {
- const utils = trpc.useContext();
-
- const addImageIdToAward = trpc.awardRouter.addImageIdToAward.useMutation();
-
- const handleAddImageIdToAward = async (imageId: string) => {
- // confirm add
- const shouldAdd = confirm(
- "Are you sure you want to add this image to the award?"
- );
- if (!shouldAdd) {
- return;
- }
-
- await addImageIdToAward.mutateAsync({
- imageId,
- });
-
- await utils.awardRouter.getAllAwardsForProfile.invalidate();
- };
-
- const deleteImage = trpc.awardRouter.deleteImage.useMutation();
-
- const handleDeleteImage = async (imageId: string) => {
- await deleteImage.mutateAsync({
- imageId,
- });
-
- await utils.awardRouter.getAllAwardImages.invalidate();
- };
-
- return (
-
- shouldClickToClaim && handleAddImageIdToAward(image.id)}
- />
- handleDeleteImage(image.id)}
- isLoading={deleteImage.isLoading}
- >
- Delete
-
-
- );
-}
-
-function AwardList({ awards = [] }: { awards?: Award[] }) {
- return (
-
- {awards.map((award) => (
-
- ))}
+
+
+ Add images to award choices
+
+ Paste a set of image URLs here to add to DB
+
+
+
+
+
);
}
diff --git a/src/components/SentenceQuestionPractice.tsx b/src/components/SentenceQuestionPractice.tsx
index 6bf32b9..709d98f 100644
--- a/src/components/SentenceQuestionPractice.tsx
+++ b/src/components/SentenceQuestionPractice.tsx
@@ -159,97 +159,95 @@ export function SentenceQuestionPractice() {
return (
{firstSentence && (
-
-
-
-
-
-
-
-
-
-
-
- Font Settings
-
- {
- setFontSize(fontSize + 1);
- }}
- onSelect={(evt) => evt.preventDefault()}
- >
- Larger font
-
- {
- setFontSize(fontSize - 1);
- }}
- onSelect={(evt) => evt.preventDefault()}
- >
- Smaller font
-
-
-
-
-
-
-
-
-
{activeQuestionIndex + 1}
-
{sentencesToUse?.length ?? 0}
-
-
-
-
-
-
- Save
-
-
+
+
+
+
+
+
+
+
+
+
+ Font Settings
+
+ {
+ setFontSize(fontSize + 1);
+ }}
+ onSelect={(evt) => evt.preventDefault()}
+ >
+ Larger font
+
+ {
+ setFontSize(fontSize - 1);
+ }}
+ onSelect={(evt) => evt.preventDefault()}
+ >
+ Smaller font
+
+
+
+
+
+
+
+
{activeQuestionIndex + 1}
+
{sentencesToUse?.length ?? 0}
+
-
- {wordsToRender.map((wordToRender, idx) => (
- {
- handleScore(wordToRender, score);
- }}
- />
- ))}
+
+
+
+
+ Save
+
-
-
-
+
+
+ {wordsToRender.map((wordToRender, idx) => (
+ {
+ handleScore(wordToRender, score);
+ }}
+ />
+ ))}
+
+
+
+
)}
);