diff options
Diffstat (limited to 'jb-ui/src/pages')
| -rw-r--r-- | jb-ui/src/pages/Preview.tsx | 9 | ||||
| -rw-r--r-- | jb-ui/src/pages/Transfer.tsx | 11 | ||||
| -rw-r--r-- | jb-ui/src/pages/Work.tsx | 12 |
3 files changed, 19 insertions, 13 deletions
diff --git a/jb-ui/src/pages/Preview.tsx b/jb-ui/src/pages/Preview.tsx index 900621e..c58a85e 100644 --- a/jb-ui/src/pages/Preview.tsx +++ b/jb-ui/src/pages/Preview.tsx @@ -5,13 +5,12 @@ import { LeaderboardFrequency, LeaderboardRow, } from "@/api_fsb"; -import { Button } from "@/components/ui/button"; import { useAppSelector } from "@/hooks"; import { bpid, formatCentsToUSD, truncate } from "@/lib/utils"; import { activeSurveys, activeUsers, maxPayout } from "@/models/grlStatsSlice"; import { clsx } from "clsx"; import moment from "moment"; -import { useEffect, useState } from "react"; +import { FormEvent, useEffect, useState } from "react"; const showSmartRank = ( item: LeaderboardRow, @@ -247,7 +246,11 @@ export const Leaderboards = () => { type RequestState = "idle" | "working" | "failed"; -const LoginForm = function ({ onSubmitSuccess }) { +interface LoginFormProps { + onSubmitSuccess: () => void; +} + +const LoginForm = function ({ onSubmitSuccess }: LoginFormProps) { const [email, setEmail] = useState(""); const [state, setState] = useState<RequestState>("idle"); diff --git a/jb-ui/src/pages/Transfer.tsx b/jb-ui/src/pages/Transfer.tsx index 0d174c1..8079da2 100644 --- a/jb-ui/src/pages/Transfer.tsx +++ b/jb-ui/src/pages/Transfer.tsx @@ -1,5 +1,5 @@ import { type FormEvent, useState } from "react"; -import { useAppDispatch, useAppSelector } from "@/hooks"; +import { useAppSelector } from "@/hooks"; import { useGetMeQuery } from "@/models/authAPI"; import { Button } from "@/components/ui/button"; import max_lulu from "./max-and-lulu.jpg"; @@ -41,10 +41,14 @@ const TransferComplete = function () { type RequestState = "idle" | "working" | "sent" | "failed"; -const TransferSubmit = function ({ onSubmitSuccess }) { +interface TransferSubmitProps { + onSubmitSuccess: () => void; +} + +const TransferSubmit = function ({ onSubmitSuccess }: TransferSubmitProps) { const [email, setEmail] = useState(""); const [state, setState] = useState<RequestState>("idle"); - const { data: user, isLoading, isError } = useGetMeQuery(); + const { data: user } = useGetMeQuery(); const submit = async (event: FormEvent<HTMLFormElement>) => { event.preventDefault(); @@ -133,7 +137,6 @@ const TransferSubmit = function ({ onSubmitSuccess }) { const Transfer = function () { const bpuid = useAppSelector((state) => state.app.bpuid); - const { data: user, isLoading, isError } = useGetMeQuery(); const [submitted, setSubmitted] = useState(false); if (!bpuid) { diff --git a/jb-ui/src/pages/Work.tsx b/jb-ui/src/pages/Work.tsx index 50ed930..6d0b1c1 100644 --- a/jb-ui/src/pages/Work.tsx +++ b/jb-ui/src/pages/Work.tsx @@ -47,13 +47,13 @@ import { } from "@tanstack/react-table"; import { XIcon } from "lucide-react"; import moment from "moment/moment"; -import { useEffect, useRef, useState } from "react"; +import { useEffect, useState } from "react"; import Markdown from "react-markdown"; const Report = ({ onClose }: { onClose: () => void }) => { - const [showComplete, setShowComplete] = useState(false); + const [, setShowComplete] = useState(false); const [selectedValues, setSelectedValues] = useState<ReportValue[]>([]); - const { data: user, isLoading, isError } = useGetMeQuery(); + const { data: user } = useGetMeQuery(); const ts = useAppSelector((state) => state.app.taskStatus); const handleCheckboxChange = (value: ReportValue, checked: boolean) => { @@ -197,10 +197,10 @@ const SurveyMonitor = () => { const [isPolling, setIsPolling] = useState(true); // const [timeAgo, setTimeAgo] = useState(""); - const [showComplete, setShowComplete] = useState(false); + const [, setShowComplete] = useState(false); const [showReport, setShowReport] = useState(false); - const { data: user, isLoading, isError } = useGetMeQuery(); + const { data: user } = useGetMeQuery(); const entered = useAppSelector((state) => state.app.currentBucketEntered); const isLow = useAppSelector((state) => isLowBalance(state)); @@ -691,7 +691,7 @@ const BucketDetails = () => { const SurveyEnter = () => { const dispatch = useAppDispatch(); const loi = useAppSelector((state) => state.app.loi); - const { data: user, isLoading, isError } = useGetMeQuery(); + const { data: user } = useGetMeQuery(); const available_cnt = useAppSelector((state) => getAvailabilityCount(state)); const buckets = useAppSelector((state) => state.app.currentBuckets); |
