31 lines
853 B
TypeScript
31 lines
853 B
TypeScript
import { serverClient } from "@/lib/trpc/server"
|
|
|
|
import SectionContainer from "@/components/Section/Container"
|
|
import SectionHeader from "@/components/Section/Header"
|
|
import SectionLink from "@/components/Section/Link"
|
|
|
|
import { TransactionTable } from "./TransactionTable"
|
|
|
|
import type { AccountPageComponentProps } from "@/types/components/myPages/myPage/accountPage"
|
|
|
|
export default async function EarnAndBurn({
|
|
link,
|
|
subtitle,
|
|
title,
|
|
}: AccountPageComponentProps) {
|
|
const transactions =
|
|
await serverClient().user.transaction.friendTransactions()
|
|
if (!transactions) {
|
|
return null
|
|
}
|
|
return (
|
|
<SectionContainer>
|
|
<SectionHeader title={title} link={link} subtitle={subtitle} />
|
|
|
|
<TransactionTable transactions={transactions.data} />
|
|
|
|
<SectionLink link={link} variant="mobile" />
|
|
</SectionContainer>
|
|
)
|
|
}
|