Some small progress on landing page

This commit is contained in:
2026-02-02 00:03:02 +01:00
parent b8f19739da
commit 733ab6d1e3
11 changed files with 691 additions and 60 deletions
+29
View File
@@ -0,0 +1,29 @@
import Link, { LinkProps } from "next/link";
import { forwardRef } from "react";
import { cn } from "@/lib/utils";
import { usePathname } from "next/navigation";
interface NavLinkCompatProps extends Omit<LinkProps, "className"> {
className?: string;
activeClassName?: string;
pendingClassName?: string;
}
const NavLink = forwardRef<HTMLAnchorElement, NavLinkCompatProps>(
({ className, activeClassName, pendingClassName, href, ...props }, ref) => {
const pathname = usePathname();
const isActive = pathname === href;
const isPending = false;
return (
<Link
ref={ref}
href={href}
className={cn(className, isActive && activeClassName, isPending && pendingClassName)}
{...props}
/>
);
}
);
NavLink.displayName = "NavLink";