tailwindlabs / tailwindui-issues

A place to report bugs discovered in Tailwind UI.
236 stars 4 forks source link

Pocket template - FAQ link / reach out to us bug #1490

Closed paulgould closed 1 year ago

paulgould commented 1 year ago

What template (if applicable)

Describe the bug After clicking on link to 'reach out to us' in the FAQ section, clicking the header link to FAQs opens an email instead of taking you to the section.

To Reproduce

  1. Go to FAQs section
  2. Click on 'reach out to us' link
  3. Email opens up
  4. Click on FAQ link in header

Expected behavior You expect to be taken to the FAQs section as before, instead it opens an email.

Browser/Device (if applicable)

adamwathan commented 1 year ago

Wow what a strange bug! My guess is this is a new and weird bug in the Next.js App router. The fix was to stop using <Link> for the mailto:... link and switch to a regular <a href="...">:

    </h2>
    <p className="mt-2 text-lg text-gray-600">
      If you have anything else you want to ask,{' '}
-     <Link
+     <a
        href="mailto:info@example.com"
        className="text-gray-900 underline"
      >
        reach out to us
-     </Link>
+     </a>
      .
    </p>
  </div>

Just published an updated version with that fix in place 👍 Will make a note to report this issue to the Next.js team!