feat: shared back navigation on detail pages

This commit is contained in:
ginnoir
2026-07-04 18:23:15 -05:00
parent 1a1c080d18
commit d090200ec8
10 changed files with 115 additions and 39 deletions
+25
View File
@@ -0,0 +1,25 @@
import Link from "next/link";
import { ArrowLeft } from "lucide-react";
import { cn } from "@/lib/utils";
type DetailBackLinkProps = {
href: string;
label: string;
className?: string;
};
export function DetailBackLink({ href, label, className }: DetailBackLinkProps) {
return (
<Link
href={href}
aria-label={`Back to ${label}`}
className={cn(
"inline-flex items-center gap-1.5 text-sm text-muted-foreground transition-colors hover:text-foreground",
className,
)}
>
<ArrowLeft aria-hidden="true" />
<span>{label}</span>
</Link>
);
}