cmux/web/app/components/blog-cta.tsx
Lawrence Chen f5de515376
Add prev/next nav to blog posts, reduce index gap (#859)
* Add prev/next navigation to blog posts, reduce index gap

* Add download/GitHub CTA to all blog posts via layout

* Track blog post slug in PostHog download/GitHub click events
2026-03-04 01:52:56 -08:00

20 lines
544 B
TypeScript

"use client";
import { usePathname } from "next/navigation";
import { DownloadButton } from "./download-button";
import { GitHubButton } from "./github-button";
export function BlogCTA() {
const pathname = usePathname();
if (pathname === "/blog") return null;
const slug = pathname.replace("/blog/", "");
const location = `blog-${slug}`;
return (
<div className="flex flex-wrap items-center justify-center gap-3 mt-12">
<DownloadButton location={location} />
<GitHubButton location={location} />
</div>
);
}