therungg/therun-frontend

Remove anchors from <Link> tags

florence-wolfe opened this issue · 2 comments

Next13 updated how Link tags work. They no longer allow <a> tags within the Links and should be removed. The codemod added a legacyBehavior prop for the components it couldn't remove the anchors automatically.

nextjs13 migration docs

          Hmm, didn't the codemod catch this one? I'm reading the `<a>` tag within link should be just removed. Not sure what's better, because that might come with some regression

Originally posted by @therungg in #33 (comment)

Acceptance criteria

  • Identify all Link tags with nested a tags
  • Remove the a tags as they are automatically created by the Link
  • Remove the legacyBehavior prop from the Link if it has been added
  • Test the links

I'll work on this

Fixed by @Nkiriobasi