From 8138549f64403874eb7c7ddfbde1cc2cc2c03695 Mon Sep 17 00:00:00 2001 From: Max Nanis Date: Mon, 23 Jun 2025 17:20:31 +0700 Subject: Typescript validation finally passes. --- src/pages/Offerwall.tsx | 50 ++++++++++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 19 deletions(-) (limited to 'src/pages/Offerwall.tsx') diff --git a/src/pages/Offerwall.tsx b/src/pages/Offerwall.tsx index 19c4515..1af7500 100644 --- a/src/pages/Offerwall.tsx +++ b/src/pages/Offerwall.tsx @@ -21,7 +21,7 @@ import {Card, CardContent, CardFooter} from "@/components/ui/card.tsx"; import {makeSelectQuestionsByIds} from "@/models/questionSlice.ts" import {CheckIcon, MessageCircleQuestionIcon, XIcon} from "lucide-react" import {useAppDispatch, useAppSelector} from '@/hooks' -import {Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle, SheetTrigger,} from "@/components/ui/sheet" +import {Sheet, SheetContent, SheetDescription, SheetHeader , SheetTitle, SheetTrigger,} from "@/components/ui/sheet" import {ProfileQuestionFull} from "@/pages/Questions.tsx" import {Answer, selectAnswerForQuestion, submitAnswer} from "@/models/answerSlice.ts"; import {assert, formatCentsToUSD, formatSeconds} from "@/lib/utils.ts"; @@ -47,7 +47,8 @@ const BucketStatus: React.FC = ({bucket}) => { } } -const ContentsGrid: React.FC = ({bucket}) => { +type ContentsGridProps = { bucket: SoftPairBucket }; +const ContentsGrid: React.FC = ({bucket}) => { const columns: ColumnDef[] = [ { @@ -113,7 +114,9 @@ const ContentsGrid: React.FC = ({bucket}) => { ) } -const ConditionalQuestions: React.FC = ({bucket}) => { + +type ConditionalQuestionsProps = { bucket: SoftPairBucket }; +const ConditionalQuestions: React.FC = ({bucket}) => { const dispatch = useAppDispatch() const questions = useSelector(makeSelectQuestionsByIds(bucket.missing_questions)) @@ -162,28 +165,35 @@ const ConditionalQuestions: React.FC = ({bucket}) => { Check Eligibility - + - + className="p-5" + > - Bucket Questions + + Bucket Questions + This survey has some unanswered questions. Answer these to determine if you're eligible for the Survey Bucket - { - questions.map(q => { - return - }) - } +
+ { + questions.map(q => { + return + }) + } +
@@ -191,13 +201,14 @@ const ConditionalQuestions: React.FC = ({bucket}) => { ) } -const CallToAction: React.FC = ({bucket}) => { +type CallToActionProps = { bucket: SoftPairBucket }; +const CallToAction: React.FC = ({bucket}) => { switch (bucket.eligibility) { case "unconditional": return (
@@ -231,7 +242,8 @@ const CallToAction: React.FC = ({bucket}) => { } } -const ConditionalBucket: React.FC = ({bucket}) => { +type ConditionalBucketProps = { bucket: SoftPairBucket }; +const ConditionalBucket: React.FC = ({bucket}) => { const [tab, setTab] = useState("bucket_cta") const toggleTab = () => setTab(tab === "bucket_cta" ? "bucket_details" : "bucket_cta") -- cgit v1.2.3