Files
web/components/MyPages/Blocks/Points/EarnAndBurn/index.tsx
2024-06-18 16:21:06 +02:00

28 lines
769 B
TypeScript

import { serverClient } from "@/lib/trpc/server"
import SectionContainer from "@/components/Section/Container"
import Header from "@/components/Section/Header"
import ClientEarnAndBurn from "./Client"
import type { AccountPageComponentProps } from "@/types/components/myPages/myPage/accountPage"
export default async function EarnAndBurn({
lang,
link,
subtitle,
title,
}: AccountPageComponentProps) {
const initialTransactions =
await serverClient().user.transaction.friendTransactions({ limit: 5 })
if (!initialTransactions) {
return null
}
return (
<SectionContainer>
<Header title={title} link={link} subtitle={subtitle} />
<ClientEarnAndBurn initialData={initialTransactions} lang={lang} />
</SectionContainer>
)
}