Unverified Commit 573fb12b authored by loopy's avatar loopy Committed by GitHub

docs: fix duplicate "scroll" parameter in Link component documentation (#74820)

### What
This PR fixes a duplicate description of the `scroll` parameter in the
[Link component API
documentation](https://nextjs.org/docs/pages/api-reference/components/link#disable-scrolling-to-the-top-of-the-page).

### Why
The section describing the `scroll` parameter included duplicated
information, which might confuse readers. Removing the redundancy
improves clarity and ensures the documentation remains concise.

### Changes
- Removed the duplicate `scroll` parameter description in the `Link`
component documentation.
Co-authored-by: 's avatarloopy-lim <loopy@jnu.ac.kr>
Co-authored-by: 's avatarSam Ko <sam@vercel.com>
parent 3aa8bc5f
......@@ -370,34 +370,6 @@ An `<a>` element is no longer required as a child of `<Link>`. Add the `legacyBe
Forces `Link` to send the `href` property to its child. Defaults to `false`. See the [passing a functional component](#nesting-a-functional-component) example for more information.
### `scroll`
Scroll to the top of the page after a navigation. Defaults to `true`.
```tsx filename="pages/index.tsx" switcher
import Link from 'next/link'
export default function Home() {
return (
<Link href="/dashboard" scroll={false}>
Dashboard
</Link>
)
}
```
```jsx filename="pages/index.js" switcher
import Link from 'next/link'
export default function Home() {
return (
<Link href="/dashboard" scroll={false}>
Dashboard
</Link>
)
}
```
### `shallow`
Update the path of the current page without rerunning [`getStaticProps`](/docs/pages/building-your-application/data-fetching/get-static-props), [`getServerSideProps`](/docs/pages/building-your-application/data-fetching/get-server-side-props) or [`getInitialProps`](/docs/pages/api-reference/functions/get-initial-props). Defaults to `false`.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment