diff --git a/src/components/primitives/Link.tsx b/src/components/primitives/Link.tsx index 93daa7a47c..8dfb5328b7 100644 --- a/src/components/primitives/Link.tsx +++ b/src/components/primitives/Link.tsx @@ -4,17 +4,20 @@ import clsx from 'clsx'; import NextLink, { LinkProps as NextLinkProps } from 'next/link'; import { useRouter } from 'next/router'; import * as React from 'react'; +import { AnchorHTMLAttributes } from 'react'; import { CustomMarket } from 'src/ui-config/marketsConfig'; // Add support for the sx prop for consistency with the other branches. const Anchor = styled('a')({}); interface NextLinkComposedProps - extends Omit, 'href'>, - Omit { + extends Omit, 'href' | 'onClick' | 'onMouseEnter'>, + Omit { to: NextLinkProps['href']; linkAs?: NextLinkProps['as']; href?: NextLinkProps['href']; + onClick?: (event: React.MouseEvent) => void; + onMouseEnter?: (event: React.MouseEvent) => void; } export const NextLinkComposed = React.forwardRef(