Files
web/components/MyPages/Blocks/Points/EarnAndBurn/index.tsx
Matilda Landström c6ad107e49 Merged in feat/section-header-link (pull request #314)
Feat(WEB-359): Update section link for mobile

Approved-by: Chuma Mcphoy (We Ahead)
Approved-by: Arvid Norlin
2024-07-04 10:42:01 +00:00

30 lines
886 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 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>
<SectionHeader title={title} link={link} subtitle={subtitle} />
<ClientEarnAndBurn initialData={initialTransactions} lang={lang} />
<SectionLink link={link} variant="mobile" />
</SectionContainer>
)
}