chore: add no unused vars lint rule
This commit is contained in:
@@ -12,11 +12,6 @@ export default async function HowItWorks({
|
||||
firstItem,
|
||||
}: HowItWorksProps) {
|
||||
const intl = await getIntl()
|
||||
const displayHeader = !!(
|
||||
dynamic_content.link ||
|
||||
dynamic_content.subtitle ||
|
||||
dynamic_content.title
|
||||
)
|
||||
return (
|
||||
<SectionWrapper dynamic_content={dynamic_content} firstItem={firstItem}>
|
||||
<section className={styles.container}>
|
||||
|
||||
@@ -10,16 +10,7 @@ import Pagination from "@/components/MyPages/Pagination"
|
||||
|
||||
import ClientTable from "./ClientTable"
|
||||
|
||||
import type { Transactions } from "@/types/components/myPages/myPage/earnAndBurn"
|
||||
|
||||
export default function TransactionTable({
|
||||
initialJourneyTransactions,
|
||||
}: {
|
||||
initialJourneyTransactions: {
|
||||
data: { transactions: Transactions }
|
||||
meta: { totalPages: number }
|
||||
}
|
||||
}) {
|
||||
export default function TransactionTable() {
|
||||
const limit = 5
|
||||
const [page, setPage] = useState(1)
|
||||
const { data, isFetching, isLoading } =
|
||||
@@ -29,8 +20,6 @@ export default function TransactionTable({
|
||||
page,
|
||||
},
|
||||
{
|
||||
// TODO: fix the initial data issues on page load
|
||||
// initialData: initialJourneyTransactions,
|
||||
placeholderData: keepPreviousData,
|
||||
}
|
||||
)
|
||||
|
||||
@@ -1,18 +1,5 @@
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import ClientJourney from "./Client"
|
||||
|
||||
export default async function JourneyTable() {
|
||||
const initialJourneyTransactions =
|
||||
await serverClient().user.transaction.friendTransactions({
|
||||
page: 1,
|
||||
limit: 5,
|
||||
})
|
||||
if (!initialJourneyTransactions?.data) {
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
<ClientJourney initialJourneyTransactions={initialJourneyTransactions} />
|
||||
)
|
||||
return <ClientJourney />
|
||||
}
|
||||
|
||||
@@ -4,8 +4,6 @@ import { createContext, useCallback, useContext, useEffect } from "react"
|
||||
|
||||
import { trpc } from "@/lib/trpc/client"
|
||||
|
||||
import useLang from "@/hooks/useLang"
|
||||
|
||||
import type { RedeemFlowContext } from "@/types/components/myPages/myPage/accountPage"
|
||||
import type { RewardWithRedeem } from "@/server/routers/contentstack/reward/output"
|
||||
|
||||
@@ -27,7 +25,6 @@ export default function useRedeemFlow() {
|
||||
timeRemaining,
|
||||
setTimeRemaining,
|
||||
} = useContext(RedeemContext)
|
||||
const lang = useLang()
|
||||
|
||||
const update = trpc.contentstack.rewards.redeem.useMutation<{
|
||||
rewards: RewardWithRedeem[]
|
||||
|
||||
@@ -53,7 +53,6 @@ function getIconForRewardId(rewardId: RewardId): IconName {
|
||||
return IconName.GiftOpen
|
||||
|
||||
default: {
|
||||
const unhandledRewardId: never = rewardId
|
||||
return IconName.GiftOpen
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
"use client"
|
||||
|
||||
import { useState } from "react"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { dt } from "@/lib/dt"
|
||||
|
||||
@@ -19,7 +18,6 @@ import type { StayCardProps } from "@/types/components/myPages/stays/stayCard"
|
||||
|
||||
export default function StayCard({ stay }: StayCardProps) {
|
||||
const lang = useLang()
|
||||
const intl = useIntl()
|
||||
|
||||
// TODO: Temporary loading. Remove when current web is deleted.
|
||||
const [loading, setLoading] = useState(false)
|
||||
|
||||
Reference in New Issue
Block a user