|
@ -1,5 +1,8 @@ |
|
|
import React, { Component } from 'react' |
|
|
import React, { Component } from 'react' |
|
|
import PropTypes from 'prop-types' |
|
|
import PropTypes from 'prop-types' |
|
|
|
|
|
import Isvg from 'react-inlinesvg' |
|
|
|
|
|
import searchIcon from 'icons/search.svg' |
|
|
|
|
|
import xIcon from 'icons/x.svg' |
|
|
|
|
|
|
|
|
import Wallet from 'components/Wallet' |
|
|
import Wallet from 'components/Wallet' |
|
|
import LoadingBolt from 'components/LoadingBolt' |
|
|
import LoadingBolt from 'components/LoadingBolt' |
|
@ -77,11 +80,16 @@ class Activity extends Component { |
|
|
activity: { |
|
|
activity: { |
|
|
filters, |
|
|
filters, |
|
|
filter, |
|
|
filter, |
|
|
filterPulldown |
|
|
filterPulldown, |
|
|
|
|
|
searchActive, |
|
|
|
|
|
searchText |
|
|
}, |
|
|
}, |
|
|
changeFilter, |
|
|
changeFilter, |
|
|
currentActivity, |
|
|
currentActivity, |
|
|
|
|
|
|
|
|
|
|
|
updateSearchActive, |
|
|
|
|
|
updateSearchText, |
|
|
|
|
|
|
|
|
walletProps |
|
|
walletProps |
|
|
} = this.props |
|
|
} = this.props |
|
|
|
|
|
|
|
@ -92,21 +100,45 @@ class Activity extends Component { |
|
|
<Wallet {...walletProps} /> |
|
|
<Wallet {...walletProps} /> |
|
|
|
|
|
|
|
|
<div className={styles.activities}> |
|
|
<div className={styles.activities}> |
|
|
<header className={styles.header}> |
|
|
{ |
|
|
<section> |
|
|
searchActive ? |
|
|
<ul className={styles.filters}> |
|
|
<header className={`${styles.header} ${styles.search}`}> |
|
|
{ |
|
|
<section> |
|
|
filters.map(f => ( |
|
|
<input |
|
|
<li key={f.key} className={f.key === filter.key && styles.activeFilter} onClick={() => changeFilter(f)}> |
|
|
placeholder='Search' |
|
|
<span>{f.name}</span> |
|
|
value={searchText} |
|
|
|
|
|
onChange={event => updateSearchText(event.target.value)} |
|
|
<div className={f.key === filter.key && styles.activeBorder} /> |
|
|
/> |
|
|
</li> |
|
|
</section> |
|
|
)) |
|
|
<section onClick={() => { |
|
|
} |
|
|
updateSearchActive(false) |
|
|
</ul> |
|
|
updateSearchText('') |
|
|
</section> |
|
|
}}> |
|
|
</header> |
|
|
<span className={styles.xIcon}> |
|
|
|
|
|
<Isvg src={xIcon} /> |
|
|
|
|
|
</span> |
|
|
|
|
|
</section> |
|
|
|
|
|
</header> |
|
|
|
|
|
: |
|
|
|
|
|
<header className={styles.header}> |
|
|
|
|
|
<section> |
|
|
|
|
|
<ul className={styles.filters}> |
|
|
|
|
|
{ |
|
|
|
|
|
filters.map(f => ( |
|
|
|
|
|
<li key={f.key} className={f.key === filter.key && styles.activeFilter} onClick={() => changeFilter(f)}> |
|
|
|
|
|
<span>{f.name}</span> |
|
|
|
|
|
|
|
|
|
|
|
<div className={f.key === filter.key && styles.activeBorder} /> |
|
|
|
|
|
</li> |
|
|
|
|
|
)) |
|
|
|
|
|
} |
|
|
|
|
|
</ul> |
|
|
|
|
|
</section> |
|
|
|
|
|
<section onClick={() => updateSearchActive(true)}> |
|
|
|
|
|
<Isvg src={searchIcon} /> |
|
|
|
|
|
</section> |
|
|
|
|
|
</header> |
|
|
|
|
|
} |
|
|
<ul className={`${styles.activityContainer} ${filterPulldown && styles.pulldown}`}> |
|
|
<ul className={`${styles.activityContainer} ${filterPulldown && styles.pulldown}`}> |
|
|
{ |
|
|
{ |
|
|
currentActivity.map((activityBlock, index) => ( |
|
|
currentActivity.map((activityBlock, index) => ( |
|
|