pager.tsx
This file
Path
apps/web/src/features/code/pager.tsx
33 lines · 831 bytes · TypeScript
Last changed by
Merge build/comments-web-features into mainoscabrielbefore adoption74bfc72
History of this fileTake it
12345678910111213141516171819202122232425262728293031323334import { Pagination, PaginationContent, PaginationItem, PaginationNext, PaginationPrevious,} from "@/components/ui/pagination";
export const Pager = ({ newer, older,}: { readonly newer?: string | undefined; readonly older?: string | undefined;}) => newer === undefined && older === undefined ? null : ( <Pagination className="justify-between"> <PaginationContent> {newer === undefined ? null : ( <PaginationItem> <PaginationPrevious href={newer} text="Newer" /> </PaginationItem> )} </PaginationContent> <PaginationContent> {older === undefined ? null : ( <PaginationItem> <PaginationNext href={older} text="Older" /> </PaginationItem> )} </PaginationContent> </Pagination> );