Skip to content

Commit

Permalink
rm invisible row
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenhoaidanh committed Aug 9, 2023
1 parent dcd4993 commit 6df9757
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/pages/CrossChain/TransfersHistory/HistoryTable/Desktop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Trans } from '@lingui/macro'
import { Flex } from 'rebass'
import styled, { css } from 'styled-components'

import { ITEMS_PER_PAGE } from 'pages/Bridge/consts'
import TransactionItem from 'pages/CrossChain/TransfersHistory/HistoryTable/TransactionItem'

import { Props } from './index'
Expand Down Expand Up @@ -46,26 +45,6 @@ export const TableRow = styled.div`
`

const Desktop: React.FC<Props> = ({ transfers }) => {
const renderInvisibleRows = () => {
// don't need invisible rows for upToExtraSmall screens
if (transfers.length === ITEMS_PER_PAGE) {
return null
}

return Array(ITEMS_PER_PAGE - transfers.length)
.fill(0)
.map((_, i) => {
return (
<TableRow
key={i}
style={{
visibility: 'hidden',
}}
/>
)
})
}

return (
<Flex flexDirection="column" style={{ flex: 1 }}>
<TableHeader>
Expand All @@ -88,7 +67,6 @@ const Desktop: React.FC<Props> = ({ transfers }) => {
{transfers.map(transfer => (
<TransactionItem data={transfer} key={transfer.srcTxHash} />
))}
{renderInvisibleRows()}
</Flex>
)
}
Expand Down

0 comments on commit 6df9757

Please sign in to comment.