Prevent modal from closing on its own

This commit is contained in:
Mati Dastugue 2020-12-18 10:34:57 -03:00
parent 0814eb528e
commit 62232e6dc2
3 changed files with 12 additions and 14 deletions

View File

@ -26,7 +26,6 @@ const TransferDescription = ({
}: TransferDescriptionProps): ReactElement | null => { }: TransferDescriptionProps): ReactElement | null => {
const recipientName = useSelector((state) => getNameFromAddressBookSelector(state, recipient)) const recipientName = useSelector((state) => getNameFromAddressBookSelector(state, recipient))
const [sendModalOpen, setSendModalOpen] = React.useState(false) const [sendModalOpen, setSendModalOpen] = React.useState(false)
const sendModalOpenHandler = () => { const sendModalOpenHandler = () => {
setSendModalOpen(true) setSendModalOpen(true)
} }

View File

@ -73,13 +73,11 @@ const ExpandedModuleTx = ({ tx }: { tx: SafeModuleTransaction }): ReactElement =
</Block> </Block>
<Hairline /> <Hairline />
<Block className={cn(classes.txDataContainer, classes.incomingTxBlock)}> <Block className={cn(classes.txDataContainer, classes.incomingTxBlock)}>
{recipient && (
<TransferDescription <TransferDescription
amountWithSymbol={amountWithSymbol} amountWithSymbol={amountWithSymbol}
isTokenTransfer={!sameAddress(amountWithSymbol, NOT_AVAILABLE)} isTokenTransfer={!sameAddress(amountWithSymbol, NOT_AVAILABLE)}
recipient={recipient} recipient={recipient}
/> />
)}
</Block> </Block>
</Col> </Col>
</Row> </Row>

View File

@ -35,6 +35,10 @@ const TxsTable = ({ classes }) => {
trackEvent({ category: SAFE_NAVIGATION_EVENT, action: 'Transactions' }) trackEvent({ category: SAFE_NAVIGATION_EVENT, action: 'Transactions' })
}, [trackEvent]) }, [trackEvent])
useEffect(() => {
console.log('La coupeeeee')
}, [])
const handleTxExpand = (rowId) => { const handleTxExpand = (rowId) => {
setExpandedTx((prevRowId) => (prevRowId === rowId ? null : rowId)) setExpandedTx((prevRowId) => (prevRowId === rowId ? null : rowId))
} }
@ -121,12 +125,9 @@ const TxsTable = ({ classes }) => {
colSpan={6} colSpan={6}
style={{ paddingBottom: 0, paddingTop: 0 }} style={{ paddingBottom: 0, paddingTop: 0 }}
> >
<Collapse <Collapse in={expandedTx === rowId} unmountOnExit>
component={() => <ExpandedTx row={row} />} <ExpandedTx row={row} />
in={expandedTx === rowId} </Collapse>
timeout="auto"
unmountOnExit
/>
</TableCell> </TableCell>
</TableRow> </TableRow>
</React.Fragment> </React.Fragment>