summaryrefslogtreecommitdiffstats
path: root/ui/src/components/main.tsx
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-01-19 16:47:54 -0500
committerDessalines <tyhou13@gmx.com>2020-01-19 16:47:54 -0500
commitac7a4031a809bac9ba958319ad678ea70df8618a (patch)
treef9cacf1123838132e316322034fb51c1665d7db8 /ui/src/components/main.tsx
parent96c1fceb99f99fbda2464664171ee899e48e03c4 (diff)
Hide next paginator.
- Fixes #441 - Hide post sort radio if no comments.
Diffstat (limited to 'ui/src/components/main.tsx')
-rw-r--r--ui/src/components/main.tsx14
1 files changed, 8 insertions, 6 deletions
diff --git a/ui/src/components/main.tsx b/ui/src/components/main.tsx
index 9e7d690d..95eeb1df 100644
--- a/ui/src/components/main.tsx
+++ b/ui/src/components/main.tsx
@@ -480,12 +480,14 @@ export class Main extends Component<any, MainState> {
<T i18nKey="prev">#</T>
</button>
)}
- <button
- class="btn btn-sm btn-secondary"
- onClick={linkEvent(this, this.nextPage)}
- >
- <T i18nKey="next">#</T>
- </button>
+ {this.state.posts.length == fetchLimit && (
+ <button
+ class="btn btn-sm btn-secondary"
+ onClick={linkEvent(this, this.nextPage)}
+ >
+ <T i18nKey="next">#</T>
+ </button>
+ )}
</div>
);
}