Files
web/components/MyPages/Blocks/Points/EarnAndBurn/index.tsx

29 lines
756 B
TypeScript

import { serverClient } from "@/lib/trpc/server"
import Header from "@/components/SectionHeader"
import ClientEarnAndBurn from "./Client"
import styles from "./earnAndBurn.module.css"
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 (
<div className={styles.container}>
<Header title={title} link={link} subtitle={subtitle} />
<ClientEarnAndBurn initialData={initialTransactions} lang={lang} />
</div>
)
}