import React from 'react' ; import Link , { LinkProps } from 'next/link' ; import styled from '@emotion/styled' ; import { Omit } from '@src/modules/shared/SharedTypes' ; const Anchor = styled . a `
  text-decoration: none;
  &:hover {
    text-decoration: none;
  }
` ; export type NextLinkProps = React . PropsWithChildren < Omit < LinkProps , 'as' | 'passHref' > > & { className ? : string ; } ; const NextLink = React . forwardRef < HTMLAnchorElement , NextLinkProps > ( function NextLink ( { children , href , prefetch , replace , scroll , shallow , ... rest } , ref ) { return ( < Link { ... { href , prefetch , replace , scroll , shallow } } passHref = { true } > < Anchor ref = { ref } { ... rest } > { children } < /Anchor> < /Link>); } ) ; export default NextLink ;