import Link from "next/link" import { serverClient } from "@/lib/trpc/server" import Title from "@/components/Title" import styles from "./current.module.css" import { AccountPageComponentProps } from "@/types/components/myPages/myPage/accountPage" export default async function CurrentBenefitsBlock({ title, subtitle, link, }: AccountPageComponentProps) { const benefits = await serverClient().user.benefits.current() return (
{title && ( {title} )} {link && ( {link.text} )}
{subtitle &&

{subtitle}

}
{benefits.map((benefit) => ( <span className={styles.value}>{benefit.value}</span>{" "} {benefit.explanation}

{benefit.subtitle}

))}
) }