add a message when a user has no history
This commit is contained in:
parent
1d387cdf1a
commit
e9e4c629a4
1 changed files with 9 additions and 2 deletions
|
@ -99,7 +99,8 @@ class UserHistoryPage extends React.PureComponent<Props, State> {
|
|||
|
||||
const allSelected = Object.keys(itemsSelected).length === history.length;
|
||||
const selectHandler = allSelected ? this.unselectAll : this.selectAll;
|
||||
return (
|
||||
|
||||
return history.length ? (
|
||||
<React.Fragment>
|
||||
<div className="card__actions card__actions--between">
|
||||
{Object.keys(itemsSelected).length ? (
|
||||
|
@ -109,7 +110,6 @@ class UserHistoryPage extends React.PureComponent<Props, State> {
|
|||
{/* Using an empty span so spacing stays the same if the button isn't rendered */}
|
||||
</span>
|
||||
)}
|
||||
|
||||
<Button
|
||||
button="link"
|
||||
label={allSelected ? __('Cancel') : __('Select All')}
|
||||
|
@ -159,6 +159,13 @@ class UserHistoryPage extends React.PureComponent<Props, State> {
|
|||
</FormRow>
|
||||
)}
|
||||
</React.Fragment>
|
||||
) : (
|
||||
<div className="page__empty">
|
||||
{__("You don't have anything saved in history yet, go check out some content on LBRY!")}
|
||||
<div className="card__actions card__actions--center">
|
||||
<Button button="primary" navigate="/discover" label={__('Explore new content')} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue