Skip to content

Commit

Permalink
feat(Layout): tx list empty search fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip London committed Feb 2, 2020
1 parent 675b72c commit b622783
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const Wrapper = styled.div`
justify-content: center;
align-items: center;
width: 100%;
margin-top: 25px;
`
const Header = styled(Text)`
margin: 15px 0 5px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,6 @@ import CoinIntroduction from './CoinIntroduction'
import TransactionFilters from './TransactionFilters'
import TransactionList from './TransactionList'

// const Wrapper = styled(LazyLoadContainer)`
// width: 100%;
// height: 100%;
// display: flex;
// flex-direction: column;
// justify-content: flex-start;
// align-items: flex-start;
// box-sizing: border-box;
// overflow: auto;
// `
const PageTitle = styled.div`
display: flex;
flex-direction: row;
Expand Down Expand Up @@ -100,17 +90,7 @@ class TransactionsContainer extends React.PureComponent {
} = this.props
const { colorCode, displayName, icons } = coinModel

return empty ? (
search ? (
<SceneWrapper centerContent>
<EmptyTx />
</SceneWrapper>
) : (
<SceneWrapper centerContent>
<CoinIntroduction coin={coin} />
</SceneWrapper>
)
) : (
return (
<SceneWrapper>
<LazyLoadContainer onLazyLoad={this.handleLoadMore}>
<Header>
Expand All @@ -134,18 +114,30 @@ class TransactionsContainer extends React.PureComponent {
</StatsContainer>
</Header>
<TransactionFilters coin={coin} />
{pages.map((value, index) => (
<TransactionList
buySellPartner={buySellPartner}
coin={coin}
currency={currency}
data={value}
key={index}
onArchive={this.handleArchive}
onLoadMore={this.handleLoadMore}
onRefresh={this.handleRefresh}
/>
))}
{empty ? (
search ? (
<SceneWrapper centerContent>
<EmptyTx />
</SceneWrapper>
) : (
<SceneWrapper centerContent>
<CoinIntroduction coin={coin} />
</SceneWrapper>
)
) : (
pages.map((value, index) => (
<TransactionList
buySellPartner={buySellPartner}
coin={coin}
currency={currency}
data={value}
key={index}
onArchive={this.handleArchive}
onLoadMore={this.handleLoadMore}
onRefresh={this.handleRefresh}
/>
))
)}
</LazyLoadContainer>
</SceneWrapper>
)
Expand Down

0 comments on commit b622783

Please sign in to comment.