Skip to content

Commit

Permalink
Merge pull request #3092 from thematters/fix/revert-codemod
Browse files Browse the repository at this point in the history
fix(link): revert codemoded <Link> by Next.js 13
  • Loading branch information
robertu7 authored Jan 13, 2023
2 parents 303d028 + c9fe194 commit e340edd
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/components/Notice/NoticeActorAvatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ const NoticeActorAvatar = ({

return (
<Link {...path}>
<Avatar user={user} size={size} />
<a>
<Avatar user={user} size={size} />
</a>
</Link>
)
}
Expand Down
6 changes: 5 additions & 1 deletion src/components/Notice/NoticeActorName.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ const NoticeActorName = ({
userName: user.userName || '',
})

return <Link {...path}>{user.displayName}</Link>
return (
<Link {...path}>
<a>{user.displayName}</a>
</Link>
)
}

NoticeActorName.fragments = {
Expand Down
6 changes: 5 additions & 1 deletion src/components/Notice/NoticeArticleTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ const NoticeArticleTitle = ({
})

if (!isBlock) {
return <Link {...path}>{article.title}</Link>
return (
<Link {...path}>
<a>{article.title}</a>
</Link>
)
}

return <ArticleDigestTitle article={article} textSize="md-s" />
Expand Down
6 changes: 5 additions & 1 deletion src/components/Notice/NoticeCircleName.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ const NoticeCircleName = ({
circle,
})

return <Link {...(path || circlePath)}>{circle.displayName}</Link>
return (
<Link {...(path || circlePath)}>
<a>{circle.displayName}</a>
</Link>
)
}

NoticeCircleName.fragments = {
Expand Down

1 comment on commit e340edd

@vercel
Copy link

@vercel vercel bot commented on e340edd Jan 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.