chore: remove mock data
This commit is contained in:
@@ -39,15 +39,7 @@ function EarnAndBurn({
|
||||
fetchNextPage()
|
||||
}
|
||||
}
|
||||
const transaction = {
|
||||
city: "stockholm",
|
||||
hotelName: "Hotel",
|
||||
nights: 2,
|
||||
awardPoints: 1000,
|
||||
checkinDate: "2022-01-01",
|
||||
checkoutDate: "2022-01-03",
|
||||
confirmationNumber: "123456",
|
||||
}
|
||||
|
||||
const transactions = data?.pages.flatMap((page) => page.data) ?? []
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
@@ -56,12 +48,14 @@ function EarnAndBurn({
|
||||
<div className={styles.mobileTableContainer}>
|
||||
<table className={styles.mobileTable}>
|
||||
<thead className={styles.mobileThead}>
|
||||
<th className={styles.mobileTh}>{_("Transactions")}</th>
|
||||
<th className={styles.mobileTh}>{_("Points")}</th>
|
||||
<tr>
|
||||
<th className={styles.mobileTh}>{_("Transactions")}</th>
|
||||
<th className={styles.mobileTh}>{_("Points")}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{transactions.length || true ? (
|
||||
[transaction, transaction, transaction].map((xtransaction) => (
|
||||
{transactions.length ? (
|
||||
transactions.map((transaction) => (
|
||||
<tr
|
||||
className={styles.mobileTr}
|
||||
key={transaction.confirmationNumber}
|
||||
@@ -141,11 +135,16 @@ function EarnAndBurn({
|
||||
))}
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td colSpan={tableHeadings.length} className={styles.placeholder}>
|
||||
{_("No transactions available")}
|
||||
</td>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td
|
||||
colSpan={tableHeadings.length}
|
||||
className={styles.placeholder}
|
||||
>
|
||||
{_("No transactions available")}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user