mirror of
https://github.com/Unleash/unleash.git
synced 2025-10-27 11:02:16 +01:00
comments from PR review
This commit is contained in:
parent
6becea2842
commit
7505c3cde1
@ -102,14 +102,12 @@ const ChangeRequestsInner = () => {
|
||||
|
||||
const columns = useMemo(
|
||||
() => [
|
||||
{
|
||||
columnHelper.accessor('id', {
|
||||
id: 'Title',
|
||||
header: 'Title',
|
||||
meta: { width: '300px' },
|
||||
cell: ({ row }) => (
|
||||
<GlobalChangeRequestTitleCell {...row.original} />
|
||||
),
|
||||
},
|
||||
cell: GlobalChangeRequestTitleCell,
|
||||
}),
|
||||
columnHelper.accessor('features', {
|
||||
id: 'Updated feature flags',
|
||||
header: 'Updated feature flags',
|
||||
|
||||
@ -4,6 +4,7 @@ import { Link as RouterLink, type LinkProps } from 'react-router-dom';
|
||||
import { useProjectOverviewNameOrId } from 'hooks/api/getters/useProjectOverview/useProjectOverview';
|
||||
import { Truncator } from 'component/common/Truncator/Truncator';
|
||||
import type { ChangeRequestSearchItemSchema } from 'openapi';
|
||||
import type { Row } from '@tanstack/react-table';
|
||||
|
||||
const LinkContainer = styled('div')(({ theme }) => ({
|
||||
color: theme.palette.text.secondary,
|
||||
@ -34,13 +35,21 @@ const UpdateText = styled(Typography)(({ theme }) => ({
|
||||
fontSize: theme.typography.body2.fontSize,
|
||||
}));
|
||||
|
||||
type GlobalChangeRequestTitleCellProps = {
|
||||
row: Row<ChangeRequestSearchItemSchema>;
|
||||
};
|
||||
|
||||
export const GlobalChangeRequestTitleCell = ({
|
||||
id,
|
||||
title,
|
||||
project,
|
||||
features: featureChanges,
|
||||
segments: segmentChanges,
|
||||
}: ChangeRequestSearchItemSchema) => {
|
||||
row: {
|
||||
original: {
|
||||
id,
|
||||
title,
|
||||
project,
|
||||
features: featureChanges,
|
||||
segments: segmentChanges,
|
||||
},
|
||||
},
|
||||
}: GlobalChangeRequestTitleCellProps) => {
|
||||
const projectName = useProjectOverviewNameOrId(project);
|
||||
const totalChanges =
|
||||
featureChanges?.length ?? 0 + segmentChanges?.length ?? 0;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user