type ButtonLinkProps = Omit<ComponentProps<typeof Link>, "to" | "className"> &
  ({ to?: never; href: string } | { to: string; href?: never });

export default function ButtonLink({
  to,
  href,
  children,
  ...rest
}: ButtonLinkProps) {
  if (href)
    return (
      <a href={href} className={styles.buttonLink} {...rest}>