Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
fix(wallet): hide expired toggle for empty wallet
Browse files Browse the repository at this point in the history
Hide the "show / hide expired" toggle for new users with no previous
activity.

For new users with an empty wallet it doesn't make any sense that in
middle of the activity list there is a toggle button to show/hide
expired requests, since we know the user has no requests.
  • Loading branch information
mrfelton committed Sep 21, 2018
1 parent f8f8dab commit 14c0f8e
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions app/components/Activity/Activity.js
Expand Up @@ -218,17 +218,18 @@ class Activity extends Component {
</ul>
</li>
))}
{showExpiredToggle && (
<li>
<div className={styles.toggleExpired} onClick={toggleExpiredRequests}>
{showExpiredRequests ? (
<FormattedMessage {...messages.hide_expired} />
) : (
<FormattedMessage {...messages.show_expired} />
)}
</div>
</li>
)}
{showExpiredToggle &&
currentActivity.length > 0 && (
<li>
<div className={styles.toggleExpired} onClick={toggleExpiredRequests}>
{showExpiredRequests ? (
<FormattedMessage {...messages.hide_expired} />
) : (
<FormattedMessage {...messages.show_expired} />
)}
</div>
</li>
)}
</ul>
</div>
</div>
Expand Down

0 comments on commit 14c0f8e

Please sign in to comment.