mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-08 16:06:13 +02:00
Display author when only one contribute
This commit is contained in:
committed by
Jean-Philippe Sirois
parent
4492b17a4b
commit
79eaea6e05
@@ -45,6 +45,7 @@ export const Header: React.FC<IHeaderProps> = ({
|
|||||||
{authors && (
|
{authors && (
|
||||||
<SC.Meta>
|
<SC.Meta>
|
||||||
<StackedAvatars authors={authors} />
|
<StackedAvatars authors={authors} />
|
||||||
|
{authors.length > 1 ? (
|
||||||
<SC.PopoverToggler>
|
<SC.PopoverToggler>
|
||||||
{authors.length} contributor{authors.length > 1 && "s"}
|
{authors.length} contributor{authors.length > 1 && "s"}
|
||||||
<SC.Popover>
|
<SC.Popover>
|
||||||
@@ -53,6 +54,9 @@ export const Header: React.FC<IHeaderProps> = ({
|
|||||||
.join(", ")}
|
.join(", ")}
|
||||||
</SC.Popover>
|
</SC.Popover>
|
||||||
</SC.PopoverToggler>
|
</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