Skip to content

Commit

Permalink
fixing bug
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe-lyons committed Sep 6, 2022
1 parent 0dbe9fe commit 84fff4d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions datahub-web-react/src/app/domain/DomainListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { useEntityRegistry } from '../useEntityRegistry';
import AvatarsGroup from '../shared/avatar/AvatarsGroup';
import EntityDropdown from '../entity/shared/EntityDropdown';
import { EntityMenuItems } from '../entity/shared/EntityDropdown/EntityDropdown';
import { ELASTIC_MAX_COUNT, getElasticCappedTotalValueText } from '../entity/shared/constants';
import { getElasticCappedTotalValueText } from '../entity/shared/constants';

const DomainItemContainer = styled(Row)`
display: flex;
Expand Down Expand Up @@ -55,7 +55,7 @@ export default function DomainListItem({ domain, onDelete }: Props) {
const displayName = entityRegistry.getDisplayName(EntityType.Domain, domain);
const logoIcon = entityRegistry.getIcon(EntityType.Domain, 12, IconStyleType.ACCENT);
const owners = domain.ownership?.owners;
let totalEntitiesText = getElasticCappedTotalValueText(domain.entities?.total || 0);
const totalEntitiesText = getElasticCappedTotalValueText(domain.entities?.total || 0);

return (
<List.Item>
Expand Down
4 changes: 2 additions & 2 deletions datahub-web-react/src/app/entity/shared/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ export const EMPTY_MESSAGES = {

export const ELASTIC_MAX_COUNT = 10000;

export const getElasticCappedTotalValueText(count: number) {
export const getElasticCappedTotalValueText = (count: number) => {
if (count === ELASTIC_MAX_COUNT) {
return `${ELASTIC_MAX_COUNT}+`;
}

return `${count}`;
}
};

0 comments on commit 84fff4d

Please sign in to comment.