"use client"; import Link from "next/link"; import { usePathname, useRouter } from "next/navigation"; import { useState } from "react"; import { Button } from "@/components/ui/button"; import { authClient } from "@/lib/auth-client"; import { cn } from "@/lib/utils"; /** A link in a navigation bar, marked when it's the current page (or, unless exact, a page under it). */ export function NavLink({ href, exact = false, children, }: { href: string; exact?: boolean; children: React.ReactNode; }) { const pathname = usePathname(); const here = pathname === href || (!exact && pathname.startsWith(href + "/")); return ( {children} ); } export function SignOutButton() { const router = useRouter(); const [pending, setPending] = useState(false); return ( ); }