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 styled from 'styled-components';
|
||||
import useSWR from 'swr';
|
||||
import Tooltip from 'rc-tooltip';
|
||||
|
||||
export interface IContributors {
|
||||
projectName: string;
|
||||
@ -37,15 +38,23 @@ const Contributors: React.FC = () => {
|
||||
return (
|
||||
<Container>
|
||||
{data.contributors.map((contributor) => (
|
||||
<Item key={contributor.login}>
|
||||
<a
|
||||
href={contributor.profile}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Avatar src={contributor.avatar_url} alt={contributor.name} />
|
||||
</a>
|
||||
</Item>
|
||||
<Tooltip
|
||||
overlay={`${contributor.name} (${contributor.contributions.join(
|
||||
', '
|
||||
)})`}
|
||||
placement="top"
|
||||
trigger={['hover']}
|
||||
>
|
||||
<Item key={contributor.login}>
|
||||
<a
|
||||
href={contributor.profile}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Avatar src={contributor.avatar_url} alt={contributor.name} />
|
||||
</a>
|
||||
</Item>
|
||||
</Tooltip>
|
||||
))}
|
||||
</Container>
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user