fix: team avatar booking option 2 (#1274)

pull/1179/head^2
Bill Gale 2021-12-08 11:40:48 +00:00 committed by GitHub
parent 3b00bc7508
commit bbf96a2e1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 5 deletions

View File

@ -28,11 +28,15 @@ export const AvatarGroup = function AvatarGroup(props: AvatarGroupProps) {
return (
<ul className={classNames("flex -space-x-2 overflow-hidden", props.className)}>
{props.items.slice(0, props.truncateAfter).map((item, idx) => (
<li key={idx} className="inline-block">
<Avatar imageSrc={item.image} title={item.title} alt={item.alt || ""} size={props.size} />
</li>
))}
{props.items.slice(0, props.truncateAfter).map((item, idx) => {
if (item.image != null) {
return (
<li key={idx} className="inline-block">
<Avatar imageSrc={item.image} title={item.title} alt={item.alt || ""} size={props.size} />
</li>
);
}
})}
{/*props.items.length > props.truncateAfter && (
<li className="relative inline-block">
<Tooltip.Tooltip delayDuration="300">