Next.js link abstraction

Simplifying the use of next-link
// next-link.tsx
import Link from 'next/link';

export const NextLink: React.FC<{href: string; className?: string}> = (
  props
) => {
  const {href, children, ...rest} = props;
  return (
    <Link href={href}>
      <a {...rest}>{children}</a>
    </Link>
  );
};

usage

<NextLink
  href={`${TEAMMATES_PAGE}/${teammate.id}`}
  className="text-blue-400 text-xs p-2 bg-blue-50 hover:bg-blue-100 rounded-md inline-flex items-center"
>
  View more
  <ChevronRightIcon className="h-3 w-3" />
</NextLink>