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 allSelected = Object.keys(itemsSelected).length === history.length;
|
||||||
const selectHandler = allSelected ? this.unselectAll : this.selectAll;
|
const selectHandler = allSelected ? this.unselectAll : this.selectAll;
|
||||||
return (
|
|
||||||
|
return history.length ? (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<div className="card__actions card__actions--between">
|
<div className="card__actions card__actions--between">
|
||||||
{Object.keys(itemsSelected).length ? (
|
{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 */}
|
{/* Using an empty span so spacing stays the same if the button isn't rendered */}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
button="link"
|
button="link"
|
||||||
label={allSelected ? __('Cancel') : __('Select All')}
|
label={allSelected ? __('Cancel') : __('Select All')}
|
||||||
|
@ -159,6 +159,13 @@ class UserHistoryPage extends React.PureComponent<Props, State> {
|
||||||
</FormRow>
|
</FormRow>
|
||||||
)}
|
)}
|
||||||
</React.Fragment>
|
</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