Skip to content

Commit f6f9783

Browse files
committed
fixup!
1 parent bbd379a commit f6f9783

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

apps/site/components/Link.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,20 @@ import type { FC, AnchorHTMLAttributes, ComponentProps } from 'react';
33
import { Link as LocalizedLink } from '#site/navigation.mjs';
44

55
export type LinkProps =
6-
| ComponentProps<typeof LocalizedLink>
7-
| AnchorHTMLAttributes<HTMLAnchorElement>;
6+
| AnchorHTMLAttributes<HTMLAnchorElement>
7+
| ComponentProps<typeof LocalizedLink>;
88

99
const Link: FC<LinkProps> = ({ href, ...props }) => {
1010
if (!href || /^https?:/.test(href as string)) {
1111
return <a href={href as string} {...props} />;
1212
}
1313

14-
return <LocalizedLink href={href} {...props} />;
14+
return (
15+
<LocalizedLink
16+
href={href}
17+
{...(props as Omit<ComponentProps<typeof LocalizedLink>, 'href'>)}
18+
/>
19+
);
1520
};
1621

1722
export default Link;

0 commit comments

Comments
 (0)