cmux/web/app/components/docs-pager.tsx
Lawrence Chen f970cdcf33 Add docs, blog, community pages and polish landing page layout
- Add docs pages (getting-started, changelog, keyboard-shortcuts)
- Add blog, community, and legal pages (privacy, terms, EULA)
- Add site header, footer, download button, and nav components
- Add sitemap and robots.txt generation
- Narrow main page container (max-w-2xl), fix footer positioning
- Switch README feature list to colon style
2026-02-09 23:38:05 -08:00

41 lines
1.1 KiB
TypeScript

"use client";
import Link from "next/link";
import { usePathname } from "next/navigation";
import { navItems } from "./docs-nav-items";
export function DocsPager() {
const pathname = usePathname();
const index = navItems.findIndex((item) => item.href === pathname);
const prev = index > 0 ? navItems[index - 1] : null;
const next = index < navItems.length - 1 ? navItems[index + 1] : null;
if (!prev && !next) return null;
return (
<nav className="flex items-center justify-between mt-12 pt-6 border-t border-border text-[14px]">
{prev ? (
<Link
href={prev.href}
className="flex items-center gap-1.5 text-muted hover:text-foreground transition-colors"
>
<span aria-hidden>&larr;</span>
{prev.title}
</Link>
) : (
<span />
)}
{next ? (
<Link
href={next.href}
className="flex items-center gap-1.5 text-muted hover:text-foreground transition-colors"
>
{next.title}
<span aria-hidden>&rarr;</span>
</Link>
) : (
<span />
)}
</nav>
);
}