From 62232e6dc2444dae2fb8f2fca1377987adc8d119 Mon Sep 17 00:00:00 2001 From: Mati Dastugue Date: Fri, 18 Dec 2020 10:34:57 -0300 Subject: [PATCH 1/2] Prevent modal from closing on its own --- .../TxDescription/TransferDescription.tsx | 1 - .../Transactions/TxsTable/ExpandedTx/index.tsx | 12 +++++------- .../safe/components/Transactions/TxsTable/index.tsx | 13 +++++++------ 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/TxDescription/TransferDescription.tsx b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/TxDescription/TransferDescription.tsx index 91a324ca..58a7c2a6 100644 --- a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/TxDescription/TransferDescription.tsx +++ b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/TxDescription/TransferDescription.tsx @@ -26,7 +26,6 @@ const TransferDescription = ({ }: TransferDescriptionProps): ReactElement | null => { const recipientName = useSelector((state) => getNameFromAddressBookSelector(state, recipient)) const [sendModalOpen, setSendModalOpen] = React.useState(false) - const sendModalOpenHandler = () => { setSendModalOpen(true) } diff --git a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/index.tsx b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/index.tsx index 22e8de7e..123f8559 100644 --- a/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/index.tsx +++ b/src/routes/safe/components/Transactions/TxsTable/ExpandedTx/index.tsx @@ -73,13 +73,11 @@ const ExpandedModuleTx = ({ tx }: { tx: SafeModuleTransaction }): ReactElement = - {recipient && ( - - )} + diff --git a/src/routes/safe/components/Transactions/TxsTable/index.tsx b/src/routes/safe/components/Transactions/TxsTable/index.tsx index 9050674b..411b8b9a 100644 --- a/src/routes/safe/components/Transactions/TxsTable/index.tsx +++ b/src/routes/safe/components/Transactions/TxsTable/index.tsx @@ -35,6 +35,10 @@ const TxsTable = ({ classes }) => { trackEvent({ category: SAFE_NAVIGATION_EVENT, action: 'Transactions' }) }, [trackEvent]) + useEffect(() => { + console.log('La coupeeeee') + }, []) + const handleTxExpand = (rowId) => { setExpandedTx((prevRowId) => (prevRowId === rowId ? null : rowId)) } @@ -121,12 +125,9 @@ const TxsTable = ({ classes }) => { colSpan={6} style={{ paddingBottom: 0, paddingTop: 0 }} > - } - in={expandedTx === rowId} - timeout="auto" - unmountOnExit - /> + + + From 2af0fb0cb11cd8b84d99f453408b73dcfaf850e3 Mon Sep 17 00:00:00 2001 From: Mati Dastugue Date: Fri, 18 Dec 2020 10:44:04 -0300 Subject: [PATCH 2/2] Update index.tsx --- src/routes/safe/components/Transactions/TxsTable/index.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/routes/safe/components/Transactions/TxsTable/index.tsx b/src/routes/safe/components/Transactions/TxsTable/index.tsx index f1a66386..0e5b2687 100644 --- a/src/routes/safe/components/Transactions/TxsTable/index.tsx +++ b/src/routes/safe/components/Transactions/TxsTable/index.tsx @@ -38,10 +38,6 @@ const TxsTable = (): React.ReactElement => { trackEvent({ category: SAFE_NAVIGATION_EVENT, action: 'Transactions' }) }, [trackEvent]) - useEffect(() => { - console.log('La coupeeeee') - }, []) - const handleTxExpand = (rowId) => { setExpandedTx((prevRowId) => (prevRowId === rowId ? null : rowId)) }