Clean up PostsUserPage placeholder

This commit is contained in:
Toby Zerner 2018-09-23 10:12:12 +09:30
parent b9afcbe50d
commit 31b5b4afac

View File

@ -44,6 +44,14 @@ export default class PostsUserPage extends UserPage {
}
content() {
if (this.posts.length === 0 && ! this.loading) {
return (
<div className="PostsUserPage">
<Placeholder text={app.translator.trans('core.forum.user.posts_empty_text')} />
</div>
);
}
let footer;
if (this.loading) {
@ -60,15 +68,6 @@ export default class PostsUserPage extends UserPage {
);
}
if (this.posts.length === 0 && !this.loading) {
const text = app.translator.trans('core.forum.user.posts_empty_text');
return (
<div className="PostsUserPage">
{Placeholder.component({text})}
</div>
);
}
return (
<div className="PostsUserPage">
<ul className="PostsUserPage-list">