From 8ced679c95b51724a01f044fd44929d6cf1b3fe9 Mon Sep 17 00:00:00 2001 From: escapedcat Date: Sun, 10 Nov 2024 20:28:30 +0100 Subject: [PATCH] Feat/transaction card buttons (#790) * refactor(home): use nextui buttons for txCard * refactor(home): use nextui alert for txCard * refactor(home): use nextui spinner for txCard --- .../Home/TransactionCard/TransactionCard.tsx | 36 +++++++++---------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/src/pages/Home/TransactionCard/TransactionCard.tsx b/src/pages/Home/TransactionCard/TransactionCard.tsx index 94574d27..ab4bd72d 100644 --- a/src/pages/Home/TransactionCard/TransactionCard.tsx +++ b/src/pages/Home/TransactionCard/TransactionCard.tsx @@ -1,6 +1,5 @@ import SingleTransaction from "./SingleTransaction"; -import LoadingBox from "@/components/LoadingBox"; -import Message from "@/components/Message"; +import { Alert } from "@/components/Alert"; import { AppContext } from "@/context/app-context"; import { Implementation } from "@/models/ln-info"; import { Transaction } from "@/models/transaction.model"; @@ -9,6 +8,8 @@ import { InformationCircleIcon, LockClosedIcon, } from "@heroicons/react/24/outline"; +import { Spinner } from "@nextui-org/react"; +import { Button } from "@nextui-org/react"; import { FC, useContext, useState } from "react"; import { useTranslation } from "react-i18next"; @@ -46,10 +47,6 @@ const TransactionCard: FC = ({ ); } - if (isLoading) { - return ; - } - const pageForwardHandler = () => { setPage((p) => p + 1); }; @@ -74,14 +71,13 @@ const TransactionCard: FC = ({

{t("tx.transactions")}

- {error && } + {isLoading && } + + {error && {error}} {/* TODO: Remove after https://github.com/fusion44/blitz_api/issues/87 is resolved & Version 1.10.0 of RaspiBlitz is out */} {implementation?.includes("CLN") && ( - + {t("home.onchain_cln_no_support")} )} {!error && transactions.length === 0 && ( @@ -110,21 +106,23 @@ const TransactionCard: FC = ({ {transactions.length > 0 && (
- + - +
)}