mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
feat: count segment changes (#4468)
This commit is contained in:
parent
27c3c2393c
commit
84cbd669eb
@ -19,7 +19,14 @@ export const ChangeRequestTitleCell = ({
|
||||
row: { original },
|
||||
}: IChangeRequestTitleCellProps) => {
|
||||
const projectId = useRequiredPathParam('projectId');
|
||||
const { id, title, features: changes } = original;
|
||||
const {
|
||||
id,
|
||||
title,
|
||||
features: featureChanges,
|
||||
segments: segmentChanges,
|
||||
} = original;
|
||||
const totalChanges =
|
||||
(featureChanges || []).length + (segmentChanges || []).length;
|
||||
const path = `/projects/${projectId}/change-requests/${id}`;
|
||||
|
||||
if (!value) {
|
||||
@ -47,8 +54,7 @@ export const ChangeRequestTitleCell = ({
|
||||
</Typography>
|
||||
</StyledLink>
|
||||
<span>
|
||||
{`${changes?.length}`}{' '}
|
||||
{changes.length <= 1 ? `update` : 'updates'}
|
||||
{`${totalChanges}`} {totalChanges <= 1 ? `update` : 'updates'}
|
||||
</span>
|
||||
</TextCell>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user