From 6cb1ee538592c96e4606aa9deab4702ad968172e Mon Sep 17 00:00:00 2001 From: Arvid Norlin Date: Thu, 23 May 2024 14:59:03 +0200 Subject: [PATCH] chore: remove mock data --- .../Blocks/Points/EarnAndBurn/index.tsx | 35 +++++++++---------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/components/MyPages/Blocks/Points/EarnAndBurn/index.tsx b/components/MyPages/Blocks/Points/EarnAndBurn/index.tsx index 94b350491..415f82c68 100644 --- a/components/MyPages/Blocks/Points/EarnAndBurn/index.tsx +++ b/components/MyPages/Blocks/Points/EarnAndBurn/index.tsx @@ -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 (
@@ -56,12 +48,14 @@ function EarnAndBurn({
- - + + + + - {transactions.length || true ? ( - [transaction, transaction, transaction].map((xtransaction) => ( + {transactions.length ? ( + transactions.map((transaction) => ( - - - + + + + +
{_("Transactions")}{_("Points")}
{_("Transactions")}{_("Points")}
- {_("No transactions available")} -
+ {_("No transactions available")} +
)}