mirror of
https://github.com/zhigang1992/react.git
synced 2026-04-23 20:00:56 +08:00
refactor: migrate link component
This commit is contained in:
@@ -23,9 +23,7 @@ const VirtualAnchor: React.FC<React.PropsWithChildren<Props>> = ({ children, pur
|
||||
|
||||
return (
|
||||
<span className="parent" ref={ref}>
|
||||
<Link pure href={`#${id}`}>
|
||||
{children}
|
||||
</Link>
|
||||
<Link href={`#${id}`}>{children}</Link>
|
||||
<span className="virtual" id={id} />
|
||||
{!pure && (
|
||||
<span className="icon">
|
||||
|
||||
@@ -46,13 +46,13 @@ const Contributors: React.FC<Props> = ({ path }) => {
|
||||
<div className="contributors">
|
||||
{users.map((user, index) => (
|
||||
<Tooltip text={<b>{user.name}</b>} key={`${user.url}-${index}`}>
|
||||
<Link color pure target="_blank" rel="nofollow" href={user.url}>
|
||||
<Link color target="_blank" rel="nofollow" href={user.url}>
|
||||
<Avatar src={user.avatar} />
|
||||
</Link>
|
||||
</Tooltip>
|
||||
))}
|
||||
<Tooltip text={isChinese ? '在 GitHub 上编辑此页面' : 'Edit this page on GitHub'} type="dark">
|
||||
<Link color pure target="_blank" rel="nofollow" href={link}>
|
||||
<Link color target="_blank" rel="nofollow" href={link}>
|
||||
<Avatar text="Add" />
|
||||
</Link>
|
||||
</Tooltip>
|
||||
|
||||
Reference in New Issue
Block a user