|
@@ -22,6 +22,8 @@ import useApi from 'sentry/utils/useApi';
|
|
|
import {useLocation} from 'sentry/utils/useLocation';
|
|
|
import withOrganization from 'sentry/utils/withOrganization';
|
|
|
|
|
|
+const MAX_MEMBERS_TO_SHOW = 5;
|
|
|
+
|
|
|
type Props = {
|
|
|
allowedRoles: OrgRole[];
|
|
|
missingMembers: {integration: string; users: MissingMember[]};
|
|
@@ -96,6 +98,7 @@ export function InviteBanner({
|
|
|
if (isEligibleForBanner && showBanner) {
|
|
|
trackAnalytics('github_invite_banner.viewed', {
|
|
|
organization,
|
|
|
+ members_shown: missingMembers.users.slice(0, MAX_MEMBERS_TO_SHOW).length,
|
|
|
});
|
|
|
}
|
|
|
if (!isEligibleForBanner || !showBanner) {
|
|
@@ -127,7 +130,7 @@ export function InviteBanner({
|
|
|
|
|
|
const users = missingMembers.users;
|
|
|
|
|
|
- const cards = users.slice(0, 5).map(member => {
|
|
|
+ const cards = users.slice(0, MAX_MEMBERS_TO_SHOW).map(member => {
|
|
|
const username = member.externalId.split(':').pop();
|
|
|
return (
|
|
|
<MemberCard
|