mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-04 01:05:58 +02:00
Merge pull request #397 from MuhammadWasif/label-fix
Display author name when only one contributor
This commit is contained in:
@@ -45,14 +45,18 @@ export const Header: React.FC<IHeaderProps> = ({
|
|||||||
{authors && (
|
{authors && (
|
||||||
<SC.Meta>
|
<SC.Meta>
|
||||||
<StackedAvatars authors={authors} />
|
<StackedAvatars authors={authors} />
|
||||||
<SC.PopoverToggler>
|
{authors.length > 1 ? (
|
||||||
{authors.length} contributor{authors.length > 1 && "s"}
|
<SC.PopoverToggler>
|
||||||
<SC.Popover>
|
{authors.length} contributor{authors.length > 1 && "s"}
|
||||||
{authors
|
<SC.Popover>
|
||||||
.map((author) => `${author.name}#${author.hash}`)
|
{authors
|
||||||
.join(", ")}
|
.map((author) => `${author.name}#${author.hash}`)
|
||||||
</SC.Popover>
|
.join(", ")}
|
||||||
</SC.PopoverToggler>
|
</SC.Popover>
|
||||||
|
</SC.PopoverToggler>
|
||||||
|
) : (
|
||||||
|
`${authors[0].name}#${authors[0].hash}`
|
||||||
|
)}
|
||||||
</SC.Meta>
|
</SC.Meta>
|
||||||
)}
|
)}
|
||||||
{dateToHuman && <SC.Meta>{dateToHuman}</SC.Meta>}
|
{dateToHuman && <SC.Meta>{dateToHuman}</SC.Meta>}
|
||||||
|
|||||||
Reference in New Issue
Block a user