1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-17 13:46:47 +02:00

include segment names on deleted segments too

This commit is contained in:
Thomas Heartman 2025-06-20 10:56:30 +02:00
parent 7200f5875f
commit 580a9e6a96

View File

@ -7,6 +7,7 @@ import type {
} from '../../../changeRequest.types';
import { SegmentChangeDetails } from './SegmentChangeDetails.tsx';
import { ConflictWarning } from './ConflictWarning.tsx';
import { useSegment } from 'hooks/api/getters/useSegment/useSegment.ts';
interface ISegmentChangeProps {
segmentChange: ISegmentChange;
@ -20,7 +21,10 @@ export const SegmentChange: FC<ISegmentChangeProps> = ({
onNavigate,
actions,
changeRequestState,
}) => (
}) => {
const { segment } = useSegment(segmentChange.payload.id);
return (
<Card
elevation={0}
sx={(theme) => ({
@ -67,7 +71,9 @@ export const SegmentChange: FC<ISegmentChangeProps> = ({
}}
onClick={onNavigate}
>
<strong>{segmentChange.payload.name}</strong>
<strong>
{segmentChange.payload.name || segment?.name}
</strong>
</Link>
</Box>
</Box>
@ -78,3 +84,4 @@ export const SegmentChange: FC<ISegmentChangeProps> = ({
/>
</Card>
);
};