Skip to content

Commit 2dddbd3

Browse files
committed
frontend: only render dialog with transaction info
Rendering the transaction details dialog before it has any info will rerender the dialog and causes an effect in keyboard hook to unnecessary remove and attach an event listener on the document potentially 100s of times (one for each tx).
1 parent 499e6a0 commit 2dddbd3

File tree

1 file changed

+4
-0
lines changed
  • frontends/web/src/components/transactions/components

1 file changed

+4
-0
lines changed

frontends/web/src/components/transactions/components/details.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ export const TxDetailsDialog = ({
7777
}
7878
}, [accountCode, internalID, open, transactionInfo]);
7979

80+
if (transactionInfo === null) {
81+
return;
82+
}
83+
8084
// Amount and Confirmations info are displayed using props data
8185
// instead of transactionInfo because they are live updated.
8286
return (

0 commit comments

Comments
 (0)