Browse Source

fix(wallet): hide expired toggle for empty wallet

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.
renovate/lint-staged-8.x
Tom Kirkpatrick 6 years ago
parent
commit
14c0f8e12d
No known key found for this signature in database GPG Key ID: 72203A8EC5967EA8
  1. 23
      app/components/Activity/Activity.js

23
app/components/Activity/Activity.js

@ -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>

Loading…
Cancel
Save