Files
web/apps/scandic-web/components/MyPages/myprofile/creditCards/creditCards.tsx

35 lines
1.1 KiB
TypeScript

import { serverClient } from "@/lib/trpc/server"
import AddCreditCardButton from "@/components/Profile/AddCreditCardButton"
import CreditCardList from "@/components/Profile/CreditCardList"
import Body from "@/components/TempDesignSystem/Text/Body"
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
import { getIntl } from "@/i18n"
import styles from "./creditCards.module.css"
export default async function CreditCardSlot() {
const intl = await getIntl()
const creditCards = await serverClient().user.creditCards()
return (
<section className={styles.container}>
<article className={styles.content}>
<Subtitle type="two" color="black">
{intl.formatMessage({
defaultMessage: "My payment cards",
})}
</Subtitle>
<Body color="black">
{intl.formatMessage({
defaultMessage:
"Check out the credit cards saved to your profile. Pay with a saved card when signed in for a smoother web experience.",
})}
</Body>
</article>
<CreditCardList initialData={creditCards} />
<AddCreditCardButton />
</section>
)
}