diff --git a/src/shared/components/common/paginator-cursor.tsx b/src/shared/components/common/paginator-cursor.tsx index a21f3521..46488b85 100644 --- a/src/shared/components/common/paginator-cursor.tsx +++ b/src/shared/components/common/paginator-cursor.tsx @@ -5,8 +5,18 @@ import { PaginationCursor } from "lemmy-js-client"; interface PaginatorCursorProps { prevPage?: PaginationCursor; nextPage?: PaginationCursor; - onNext(val: PaginationCursor): any; - onPrev(): any; + onNext(val: PaginationCursor): void; + onPrev(): void; +} + +function handlePrev(i: PaginatorCursor) { + i.props.onPrev(); +} + +function handleNext(i: PaginatorCursor) { + if (i.props.nextPage) { + i.props.onNext(i.props.nextPage); + } } export class PaginatorCursor extends Component { @@ -19,13 +29,13 @@ export class PaginatorCursor extends Component {