on 514b5fc help sign in
urbit.org/components/Pagination.js
24 lines 672 B history raw
1import Link from "next/link";
2import { formatDate } from "../lib/lib";
4export default function Pagination(props) {
5 return (
6 <Link
7 href={`/${props.section}/${props.post.slug}`}
8 key={`post-${props.post.slug}`}
9 >
10 <div
11 className="bg-wall-100 cursor-pointer font-semibold p-2 px-4 rounded-xl flex"
12 style={{ maxWidth: "45%" }}
13 >
14 <p className="flex-shrink-0 pr-1">{props.previous ? "<- " : ""}</p>
15 <p className="text-wall-600 truncate">{props.post.title}</p>
16 <p className="flex-shrink-0 pl-1">{props.next ? " ->" : ""}</p>
17 </div>
18 </Link>
19 );
22Pagination.defaultProps = {
23 className: "",
24};