mirror of
https://github.com/uetchy/namae.git
synced 2025-03-17 04:30:31 +09:00
refactor: show contributors' name
This commit is contained in:
parent
dbd206b77f
commit
dc62baf8be
@ -1,6 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import useSWR from 'swr';
|
import useSWR from 'swr';
|
||||||
|
import Tooltip from 'rc-tooltip';
|
||||||
|
|
||||||
export interface IContributors {
|
export interface IContributors {
|
||||||
projectName: string;
|
projectName: string;
|
||||||
@ -37,15 +38,23 @@ const Contributors: React.FC = () => {
|
|||||||
return (
|
return (
|
||||||
<Container>
|
<Container>
|
||||||
{data.contributors.map((contributor) => (
|
{data.contributors.map((contributor) => (
|
||||||
<Item key={contributor.login}>
|
<Tooltip
|
||||||
<a
|
overlay={`${contributor.name} (${contributor.contributions.join(
|
||||||
href={contributor.profile}
|
', '
|
||||||
target="_blank"
|
)})`}
|
||||||
rel="noopener noreferrer"
|
placement="top"
|
||||||
>
|
trigger={['hover']}
|
||||||
<Avatar src={contributor.avatar_url} alt={contributor.name} />
|
>
|
||||||
</a>
|
<Item key={contributor.login}>
|
||||||
</Item>
|
<a
|
||||||
|
href={contributor.profile}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
<Avatar src={contributor.avatar_url} alt={contributor.name} />
|
||||||
|
</a>
|
||||||
|
</Item>
|
||||||
|
</Tooltip>
|
||||||
))}
|
))}
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user