Skip to content

Commit

Permalink
refactor: apply PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
marcalexiei committed Dec 23, 2024
1 parent f7e2b28 commit 60bdf78
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/router/src/components/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import { useInView } from 'react-intersection-observer'
import { useRouter } from '../hooks/useRouter'
import useRoute from '../hooks/useRoute'

interface TuonoLinkProps
extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'preload'> {
interface TuonoLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
/**
* If "true" the route gets loaded when the link enters the viewport.
* @default true
*/
preload?: boolean

/**
* If "false" the scroll offset will be kept across page navigation.
* @default true
Expand All @@ -27,7 +27,7 @@ export default function Link(
children,
href,
onClick,
...otherProps
...rest
} = componentProps

const router = useRouter()
Expand All @@ -54,7 +54,7 @@ export default function Link(
}

return (
<a {...otherProps} href={href} ref={ref} onClick={handleTransition}>
<a {...rest} href={href} ref={ref} onClick={handleTransition}>
{children}
</a>
)
Expand Down

0 comments on commit 60bdf78

Please sign in to comment.