From 795dcdb894605b202de51bb9af7f656aa5a2d6b0 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Tue, 14 Nov 2023 09:36:41 -0500 Subject: [PATCH] Remove previous button for PaginatorCursor (#2221) --- .../components/common/paginator-cursor.tsx | 13 -------- src/shared/components/common/paginator.tsx | 30 ++++++++++--------- src/shared/components/community/community.tsx | 3 -- src/shared/components/home/home.tsx | 4 --- 4 files changed, 16 insertions(+), 34 deletions(-) diff --git a/src/shared/components/common/paginator-cursor.tsx b/src/shared/components/common/paginator-cursor.tsx index 46488b85b..d78993066 100644 --- a/src/shared/components/common/paginator-cursor.tsx +++ b/src/shared/components/common/paginator-cursor.tsx @@ -3,14 +3,8 @@ import { I18NextService } from "../../services"; import { PaginationCursor } from "lemmy-js-client"; interface PaginatorCursorProps { - prevPage?: PaginationCursor; nextPage?: PaginationCursor; onNext(val: PaginationCursor): void; - onPrev(): void; -} - -function handlePrev(i: PaginatorCursor) { - i.props.onPrev(); } function handleNext(i: PaginatorCursor) { @@ -26,13 +20,6 @@ export class PaginatorCursor extends Component { render() { return (
- - + {this.props.page !== 1 && ( + + )} + {!this.props.nextDisabled && ( + + )}
); } diff --git a/src/shared/components/community/community.tsx b/src/shared/components/community/community.tsx index 021214b41..3e30e644d 100644 --- a/src/shared/components/community/community.tsx +++ b/src/shared/components/community/community.tsx @@ -294,7 +294,6 @@ export class Community extends Component< } renderCommunity() { - const { pageCursor } = getCommunityQueryParams(); switch (this.state.communityRes.state) { case "loading": return ( @@ -341,10 +340,8 @@ export class Community extends Component< {this.selects(res)} {this.listings(res)}