|
|
@ -100,45 +100,42 @@ class Activity extends Component { |
|
|
|
<Wallet {...walletProps} /> |
|
|
|
|
|
|
|
<div className={styles.activities}> |
|
|
|
{ |
|
|
|
searchActive ? |
|
|
|
<header className={`${styles.header} ${styles.search}`}> |
|
|
|
<section> |
|
|
|
<input |
|
|
|
placeholder='Search' |
|
|
|
value={searchText} |
|
|
|
onChange={event => updateSearchText(event.target.value)} |
|
|
|
/> |
|
|
|
</section> |
|
|
|
<section onClick={() => { |
|
|
|
updateSearchActive(false) |
|
|
|
updateSearchText('') |
|
|
|
}}> |
|
|
|
<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> |
|
|
|
} |
|
|
|
{ |
|
|
|
searchActive ? |
|
|
|
<header className={`${styles.header} ${styles.search}`}> |
|
|
|
<section> |
|
|
|
<input |
|
|
|
placeholder='Search' |
|
|
|
value={searchText} |
|
|
|
onChange={event => updateSearchText(event.target.value)} |
|
|
|
/> |
|
|
|
</section> |
|
|
|
<section onClick={() => { updateSearchActive(false); updateSearchText('') }}> |
|
|
|
<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}`}> |
|
|
|
{ |
|
|
|
currentActivity.map((activityBlock, index) => ( |
|
|
@ -171,6 +168,8 @@ Activity.propTypes = { |
|
|
|
|
|
|
|
showActivityModal: PropTypes.func.isRequired, |
|
|
|
changeFilter: PropTypes.func.isRequired, |
|
|
|
updateSearchActive: PropTypes.func.isRequired, |
|
|
|
updateSearchText: PropTypes.func.isRequired, |
|
|
|
|
|
|
|
activity: PropTypes.object.isRequired, |
|
|
|
currentActivity: PropTypes.array.isRequired, |
|
|
|