Skip to content

[bug]: import statement for Link is incorrect in a snippet of button component docs #8425

@krishnagkmit

Description

@krishnagkmit

Describe the bug

Issue

  • the import statement for the Link is incorrect in the snippet that explains how to add Link in the Button.
  • Snippet Link

So this creates an error when the snippet is copied and used

Solution

  • replace the import statement with import Link from "next/link"

Affected component/components

Button

How to reproduce

  1. Go to snippet link
  2. copy the snippet
  3. Paste it in a nextjs project
    4 You will be prompted with an error Module '"next/link"' has no exported member 'Link'. Did you mean to use 'import Link from "next/link"' instead?

Codesandbox/StackBlitz link

No response

Logs

System Info

Chrome (version - 141.0.7390.76)
Nextjs (version - 15)

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions