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