diff --git a/src/app/components/Modal/index.tsx b/src/app/components/Modal/index.tsx index f14ae60338..2804d1198a 100644 --- a/src/app/components/Modal/index.tsx +++ b/src/app/components/Modal/index.tsx @@ -1,5 +1,6 @@ import { CrossIcon } from "@bitcoin-design/bitcoin-icons-react/filled"; import ReactModal from "react-modal"; +import { classNames } from "~/app/utils"; type Props = { children?: React.ReactNode; @@ -7,6 +8,7 @@ type Props = { close: () => void; contentLabel: string; title?: string; + position?: "top" | "center"; }; export default function Modal({ @@ -15,6 +17,7 @@ export default function Modal({ close: closeModal, contentLabel, title, + position = "center", }: Props) { return ( {title && ( diff --git a/src/app/components/TransactionsTable/TransactionModal.tsx b/src/app/components/TransactionsTable/TransactionModal.tsx index 6cc460d40a..b511e4ec24 100644 --- a/src/app/components/TransactionsTable/TransactionModal.tsx +++ b/src/app/components/TransactionsTable/TransactionModal.tsx @@ -52,16 +52,17 @@ export default function TransactionModal({ onClose(); }} contentLabel={"Transactions"} + position="top" >
{getTransactionType(transaction) == "outgoing" ? ( -
+
) : ( -
+
)} diff --git a/src/app/components/TransactionsTable/index.tsx b/src/app/components/TransactionsTable/index.tsx index 53382dcbd7..a9ac5a8f7e 100644 --- a/src/app/components/TransactionsTable/index.tsx +++ b/src/app/components/TransactionsTable/index.tsx @@ -49,66 +49,64 @@ export default function TransactionsTable({

{noResultMsg}

) : ( <> -
- {transactions?.map((tx) => { - const type = getTransactionType(tx); + {transactions?.map((tx) => { + const type = getTransactionType(tx); - return ( -
openDetails(tx)} - > -
-
- {type == "outgoing" ? ( -
- -
- ) : ( -
- -
- )} -
-
-
-

- {tx.title || - tx.boostagram?.message || - (type == "incoming" ? t("received") : t("sent"))} -

+ return ( +
openDetails(tx)} + > +
+
+ {type == "outgoing" ? ( +
+ +
+ ) : ( +
+
-

- {tx.date} + )} +

+
+
+

+ {tx.title || + tx.boostagram?.message || + (type == "incoming" ? t("received") : t("sent"))}

-
-
-

- {type == "outgoing" ? "-" : "+"}{" "} - {getFormattedSats(tx.totalAmount)} -

- - {!!tx.totalAmountFiat && ( -

- ~{tx.totalAmountFiat} -

+

+ {tx.date} +

+
+
+
+

+ > + {type == "outgoing" ? "-" : "+"}{" "} + {getFormattedSats(tx.totalAmount)} +

+ + {!!tx.totalAmountFiat && ( +

+ ~{tx.totalAmountFiat} +

+ )}
- ); - })} -
+
+ ); + })} {transaction && (