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(
|
const columns = useMemo(
|
||||||
() => [
|
() => [
|
||||||
{
|
columnHelper.accessor('id', {
|
||||||
id: 'Title',
|
id: 'Title',
|
||||||
header: 'Title',
|
header: 'Title',
|
||||||
meta: { width: '300px' },
|
meta: { width: '300px' },
|
||||||
cell: ({ row }) => (
|
cell: GlobalChangeRequestTitleCell,
|
||||||
<GlobalChangeRequestTitleCell {...row.original} />
|
}),
|
||||||
),
|
|
||||||
},
|
|
||||||
columnHelper.accessor('features', {
|
columnHelper.accessor('features', {
|
||||||
id: 'Updated feature flags',
|
id: 'Updated feature flags',
|
||||||
header: '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 { useProjectOverviewNameOrId } from 'hooks/api/getters/useProjectOverview/useProjectOverview';
|
||||||
import { Truncator } from 'component/common/Truncator/Truncator';
|
import { Truncator } from 'component/common/Truncator/Truncator';
|
||||||
import type { ChangeRequestSearchItemSchema } from 'openapi';
|
import type { ChangeRequestSearchItemSchema } from 'openapi';
|
||||||
|
import type { Row } from '@tanstack/react-table';
|
||||||
|
|
||||||
const LinkContainer = styled('div')(({ theme }) => ({
|
const LinkContainer = styled('div')(({ theme }) => ({
|
||||||
color: theme.palette.text.secondary,
|
color: theme.palette.text.secondary,
|
||||||
@ -34,13 +35,21 @@ const UpdateText = styled(Typography)(({ theme }) => ({
|
|||||||
fontSize: theme.typography.body2.fontSize,
|
fontSize: theme.typography.body2.fontSize,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
type GlobalChangeRequestTitleCellProps = {
|
||||||
|
row: Row<ChangeRequestSearchItemSchema>;
|
||||||
|
};
|
||||||
|
|
||||||
export const GlobalChangeRequestTitleCell = ({
|
export const GlobalChangeRequestTitleCell = ({
|
||||||
id,
|
row: {
|
||||||
title,
|
original: {
|
||||||
project,
|
id,
|
||||||
features: featureChanges,
|
title,
|
||||||
segments: segmentChanges,
|
project,
|
||||||
}: ChangeRequestSearchItemSchema) => {
|
features: featureChanges,
|
||||||
|
segments: segmentChanges,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}: GlobalChangeRequestTitleCellProps) => {
|
||||||
const projectName = useProjectOverviewNameOrId(project);
|
const projectName = useProjectOverviewNameOrId(project);
|
||||||
const totalChanges =
|
const totalChanges =
|
||||||
featureChanges?.length ?? 0 + segmentChanges?.length ?? 0;
|
featureChanges?.length ?? 0 + segmentChanges?.length ?? 0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user