1- import { AnchorHTMLAttributes , forwardRef } from 'react '
2- import NextLink , { LinkProps } from 'next/link '
1+ import NextLink , { type LinkProps } from 'next/link '
2+ import { type AnchorHTMLAttributes , forwardRef } from 'react '
33import { twMerge } from 'tailwind-merge'
4- import { LinkType } from '../../types/index'
4+ import type { LinkType } from '../../types/index'
55
66export type BaseLinkProps = {
77 /** What kind of content is it */
@@ -18,7 +18,7 @@ export type BaseLinkProps = {
1818 * And the strict origin policy when external for using blank
1919 */
2020export const BaseLink = forwardRef < HTMLAnchorElement , BaseLinkProps > ( function BaseLink (
21- { children, type = 'internalUrl' , className = '' , href = '' , skipInternalStyle = false , ... rest } ,
21+ { children, type = 'internalUrl' , className = '' , href = '' , skipInternalStyle = false , locale } ,
2222 ref ,
2323) {
2424 const classNames = skipInternalStyle
@@ -50,7 +50,6 @@ export const BaseLink = forwardRef<HTMLAnchorElement, BaseLinkProps>(function Ba
5050 ref = { ref }
5151 href = { href }
5252 target = "_blank"
53- { ...rest }
5453 rel = "noopener"
5554 referrerPolicy = "strict-origin-when-cross-origin"
5655 >
@@ -59,14 +58,14 @@ export const BaseLink = forwardRef<HTMLAnchorElement, BaseLinkProps>(function Ba
5958 )
6059 case 'icsLink' :
6160 return (
62- < a className = { classNames } ref = { ref } href = { href } { ... rest } >
61+ < a className = { classNames } ref = { ref } href = { href } >
6362 { children }
6463 </ a >
6564 )
6665
6766 default :
6867 return (
69- < NextLink { ... rest } ref = { ref } href = { href } prefetch = { false } className = { classNames } >
68+ < NextLink ref = { ref } href = { href } locale = { locale } prefetch = { false } className = { classNames } >
7069 { children }
7170 </ NextLink >
7271 )
0 commit comments