Skip to content

Commit 7e5cd81

Browse files
revert(Link): revert href prop from being supplied to commonProps object
1 parent b612f0d commit 7e5cd81

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/Link.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ export const BaseLink = forwardRef<IProps, "a">(
9090

9191
const commonProps: LinkProps & { ref: React.ForwardedRef<any> } = {
9292
ref,
93-
href: to,
9493
dir,
9594
...restProps,
9695
}
@@ -101,6 +100,7 @@ export const BaseLink = forwardRef<IProps, "a">(
101100
if (isHash) {
102101
return (
103102
<ChakraLink
103+
href={to}
104104
onClick={(e) => {
105105
// only track events on external links and hash links
106106
if (!isHash) {
@@ -124,6 +124,7 @@ export const BaseLink = forwardRef<IProps, "a">(
124124
if (isExternal || isPdf || isStatic) {
125125
return (
126126
<ChakraLink
127+
href={to}
127128
isExternal
128129
onClick={(e) => {
129130
// only track events on external links and hash links
@@ -159,6 +160,7 @@ export const BaseLink = forwardRef<IProps, "a">(
159160
return (
160161
<ChakraLink
161162
as={IntlLink}
163+
to={to}
162164
language={language}
163165
partiallyActive={isPartiallyActive}
164166
activeStyle={

0 commit comments

Comments
 (0)