Skip to content

Instantly share code, notes, and snippets.

View Igor-Iugin's full-sized avatar
🦉
Night time - best time

Igor Iugin Igor-Iugin

🦉
Night time - best time
View GitHub Profile
@zackdotcomputer
zackdotcomputer / LinkTo.tsx
Last active August 27, 2022 15:43
Workaround for next/link vs <a> href accessibility lint issue
// Created by Zack Sheppard (@zackdotcomputer) on 1/19/2021
// Freely available under MIT License
// Workaround for https://github.com/vercel/next.js/issues/5533
import Link, { LinkProps } from "next/link";
import { AnchorHTMLAttributes, PropsWithChildren } from "react";
type PropTypes = LinkProps & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "href">;
/// A unified component for the next/link <Link> and a standard <a> anchor.