@@ -16,7 +16,6 @@ import EllipsiCell from './EllipsiCell';
1616import { ReactComponent as RowBottomIcon } from '../assets/images/leading-icon.svg' ;
1717import { ReactComponent as RowTopIcon } from '../assets/images/leading-top-icon.svg' ;
1818import { COLORS } from '../constants' ;
19- import { useIsMobile } from '../hooks' ;
2019
2120const mapStateToProps = state => ( {
2221 decimalPlaces : state . serverInfo . decimal_places ,
@@ -174,8 +173,7 @@ class AddressHistory extends SortableTable {
174173 } ) ;
175174 }
176175
177- renderNewTableBodyUi ( ) {
178- const isMobile = useIsMobile ( ) ;
176+ renderNewTableBodyUi ( isMobile ) {
179177 const ellipsisCount = isMobile ? 4 : 12 ;
180178 return this . props . data . map ( tx => {
181179 let statusElement = '' ;
@@ -244,7 +242,9 @@ class AddressHistory extends SortableTable {
244242 }
245243
246244 renderTableBody ( ) {
247- return this . props . newUiEnabled ? this . renderNewTableBodyUi ( ) : this . renderTableBodyUi ( ) ;
245+ return this . props . newUiEnabled
246+ ? this . renderNewTableBodyUi ( this . props . isMobile )
247+ : this . renderTableBodyUi ( ) ;
248248 }
249249}
250250
@@ -265,6 +265,8 @@ AddressHistory.propTypes = {
265265 selectedToken : PropTypes . string . isRequired ,
266266 numTransactions : PropTypes . number . isRequired ,
267267 txCache : PropTypes . object . isRequired ,
268+ newUiEnabled : PropTypes . bool . isRequired ,
269+ isMobile : PropTypes . bool . isRequired ,
268270} ;
269271
270272export default connect ( mapStateToProps ) ( AddressHistory ) ;
0 commit comments