wip: initial stab trpc pagination
This commit is contained in:
@@ -4,7 +4,7 @@ import SectionContainer from "@/components/Section/Container"
|
||||
import SectionHeader from "@/components/Section/Header"
|
||||
import SectionLink from "@/components/Section/Link"
|
||||
|
||||
import { TransactionTable } from "./TransactionTable"
|
||||
import JourneyTable from "./JourneyTable"
|
||||
|
||||
import type { AccountPageComponentProps } from "@/types/components/myPages/myPage/accountPage"
|
||||
|
||||
@@ -13,17 +13,18 @@ export default async function EarnAndBurn({
|
||||
subtitle,
|
||||
title,
|
||||
}: AccountPageComponentProps) {
|
||||
const transactions =
|
||||
await serverClient().user.transaction.friendTransactions()
|
||||
if (!transactions) {
|
||||
const transactionsData =
|
||||
await serverClient().user.transaction.friendTransactions({
|
||||
limit: 10,
|
||||
page: 1,
|
||||
})
|
||||
if (!transactionsData) {
|
||||
return null
|
||||
}
|
||||
return (
|
||||
<SectionContainer>
|
||||
<SectionHeader title={title} link={link} subtitle={subtitle} />
|
||||
|
||||
<TransactionTable transactions={transactions.data} />
|
||||
|
||||
<JourneyTable />
|
||||
<SectionLink link={link} variant="mobile" />
|
||||
</SectionContainer>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user