summaryrefslogtreecommitdiffstats
path: root/ui/src/components/user.tsx
diff options
context:
space:
mode:
authorDessalines <dessalines@users.noreply.github.com>2020-07-09 20:03:33 -0400
committerGitHub <noreply@github.com>2020-07-09 20:03:33 -0400
commit85c07e7154c82e5b387bb6a02aae70645cf1d8e0 (patch)
tree3b5a56578b8b504faf366555466422f0b14b2770 /ui/src/components/user.tsx
parentd222c60cef289b57f0ce350e9f24ce2df4792ef5 (diff)
Correctly hide next / prev in paginators. Fixes #914 (#927)
Diffstat (limited to 'ui/src/components/user.tsx')
-rw-r--r--ui/src/components/user.tsx14
1 files changed, 8 insertions, 6 deletions
diff --git a/ui/src/components/user.tsx b/ui/src/components/user.tsx
index 7e679ed1..af72a397 100644
--- a/ui/src/components/user.tsx
+++ b/ui/src/components/user.tsx
@@ -893,12 +893,14 @@ export class User extends Component<any, UserState> {
{i18n.t('prev')}
</button>
)}
- <button
- class="btn btn-sm btn-secondary"
- onClick={linkEvent(this, this.nextPage)}
- >
- {i18n.t('next')}
- </button>
+ {this.state.comments.length + this.state.posts.length > 0 && (
+ <button
+ class="btn btn-sm btn-secondary"
+ onClick={linkEvent(this, this.nextPage)}
+ >
+ {i18n.t('next')}
+ </button>
+ )}
</div>
);
}