import { Box, HStack, Stack, StackProps, Text } from "@chakra-ui/react" import Link, { LinkProps } from "next/link" import { LuChevronLeft, LuChevronRight } from "react-icons/lu" interface PaginationItemProps extends StackProps { href: LinkProps["href"] external?: boolean | undefined } const PaginationItem = (props: PaginationItemProps) => { const { children, href, external, ...rest } = props return ( {external ? ( {children} ) : ( {children} )} ) } interface PaginationProps extends StackProps { previous?: { title: string url?: LinkProps["href"] external?: boolean | undefined } | null next?: { title: string url?: LinkProps["href"] external?: boolean | undefined } | null } export const Pagination = (props: PaginationProps) => { const { previous, next, ...rest } = props return ( {previous ? ( Previous {previous.title} ) : ( )} {next ? ( Next {next.title} ) : ( )} ) }