chore: add memberships "endoint"
This commit is contained in:
committed by
Michael Zetterberg
parent
f40a6d4288
commit
3e54d3c29e
@@ -8,3 +8,15 @@
|
||||
display: grid;
|
||||
gap: var(--Spacing-x1);
|
||||
}
|
||||
|
||||
.card {
|
||||
margin-top: 2rem;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
grid-template-rows: repeat(3, auto);
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.subTitle {
|
||||
grid-column: span 2;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import { PlusCircleIcon } from "@/components/Icons"
|
||||
import Link from "@/components/TempDesignSystem/Link"
|
||||
import Body from "@/components/TempDesignSystem/Text/Body"
|
||||
@@ -8,6 +10,8 @@ import styles from "./page.module.css"
|
||||
|
||||
export default async function CreditCardSlot() {
|
||||
const { formatMessage } = await getIntl()
|
||||
const creditCards = await serverClient().user.creditCards()
|
||||
|
||||
return (
|
||||
<section className={styles.container}>
|
||||
<article className={styles.content}>
|
||||
@@ -20,6 +24,21 @@ export default async function CreditCardSlot() {
|
||||
})}
|
||||
</Body>
|
||||
</article>
|
||||
{creditCards &&
|
||||
creditCards.length > 0 &&
|
||||
creditCards.map((card, idx) => (
|
||||
<div className={styles.card} key={idx}>
|
||||
<Subtitle className={styles.subTitle}>
|
||||
Name: {card.attribute.cardName}
|
||||
</Subtitle>
|
||||
<span> Type: {card.attribute.cardType} </span>
|
||||
<span> Alias: {card.attribute.alias}</span>
|
||||
<span> Number: {card.attribute.truncatedNumber}</span>
|
||||
<span>
|
||||
Expiration Date: {card.attribute.expirationDate.split("T")[0]}
|
||||
</span>
|
||||
</div>
|
||||
))}
|
||||
<Link href="#" variant="icon">
|
||||
<PlusCircleIcon color="burgundy" />
|
||||
<Body color="burgundy" textTransform="underlined">
|
||||
|
||||
Reference in New Issue
Block a user