import { _ } from "@/lib/translation"
import { serverClient } from "@/lib/trpc/server"

import styles from "./currentPointsBalance.module.css"

async function CurrentPointsBalance() {
  const user = await serverClient().user.get()
  return (
    <div className={styles.card}>
      <h2>{`${_("Total points")}*`}</h2>
      <p
        className={styles.points}
      >{`${_("Points")}: ${user.membership.currentPoints}`}</p>
      <p className={styles.disclaimer}>
        {`*${_("Points may take up to 10 days to be displayed.")}`}
      </p>
    </div>
  )
}

export default CurrentPointsBalance
