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:
parent
7200f5875f
commit
580a9e6a96
@ -7,6 +7,7 @@ import type {
|
|||||||
} from '../../../changeRequest.types';
|
} from '../../../changeRequest.types';
|
||||||
import { SegmentChangeDetails } from './SegmentChangeDetails.tsx';
|
import { SegmentChangeDetails } from './SegmentChangeDetails.tsx';
|
||||||
import { ConflictWarning } from './ConflictWarning.tsx';
|
import { ConflictWarning } from './ConflictWarning.tsx';
|
||||||
|
import { useSegment } from 'hooks/api/getters/useSegment/useSegment.ts';
|
||||||
|
|
||||||
interface ISegmentChangeProps {
|
interface ISegmentChangeProps {
|
||||||
segmentChange: ISegmentChange;
|
segmentChange: ISegmentChange;
|
||||||
@ -20,7 +21,10 @@ export const SegmentChange: FC<ISegmentChangeProps> = ({
|
|||||||
onNavigate,
|
onNavigate,
|
||||||
actions,
|
actions,
|
||||||
changeRequestState,
|
changeRequestState,
|
||||||
}) => (
|
}) => {
|
||||||
|
const { segment } = useSegment(segmentChange.payload.id);
|
||||||
|
|
||||||
|
return (
|
||||||
<Card
|
<Card
|
||||||
elevation={0}
|
elevation={0}
|
||||||
sx={(theme) => ({
|
sx={(theme) => ({
|
||||||
@ -52,7 +56,7 @@ export const SegmentChange: FC<ISegmentChangeProps> = ({
|
|||||||
px: 3,
|
px: 3,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography>Segment name: </Typography>
|
<Typography>Segment name:</Typography>
|
||||||
|
|
||||||
<Link
|
<Link
|
||||||
component={RouterLink}
|
component={RouterLink}
|
||||||
@ -67,7 +71,9 @@ export const SegmentChange: FC<ISegmentChangeProps> = ({
|
|||||||
}}
|
}}
|
||||||
onClick={onNavigate}
|
onClick={onNavigate}
|
||||||
>
|
>
|
||||||
<strong>{segmentChange.payload.name}</strong>
|
<strong>
|
||||||
|
{segmentChange.payload.name || segment?.name}
|
||||||
|
</strong>
|
||||||
</Link>
|
</Link>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
@ -77,4 +83,5 @@ export const SegmentChange: FC<ISegmentChangeProps> = ({
|
|||||||
changeRequestState={changeRequestState}
|
changeRequestState={changeRequestState}
|
||||||
/>
|
/>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user