From 51bfccd8cc78f9f247a096855457161834d0696b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20G=C3=B3is?= Date: Tue, 1 Oct 2024 16:37:07 +0100 Subject: [PATCH] chore: timeline event group icon when events are all same type (#8322) https://linear.app/unleash/issue/2-2726/groups-should-show-the-timeline-event-type-icon-when-all-events-inside Displays the event type icon for the group when all events within the group share the same type. ![image](https://github.com/user-attachments/assets/9fc68b2b-da01-423e-b767-05ce87098b27) ![image](https://github.com/user-attachments/assets/76c3a6d6-1bae-499c-aeec-006ead30cea6) --- .../EventTimelineEventGroup/EventTimelineEventCircle.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/component/events/EventTimeline/EventTimelineEventGroup/EventTimelineEventCircle.tsx b/frontend/src/component/events/EventTimeline/EventTimelineEventGroup/EventTimelineEventCircle.tsx index 22bdd0ca38..0b5e2fd761 100644 --- a/frontend/src/component/events/EventTimeline/EventTimelineEventGroup/EventTimelineEventCircle.tsx +++ b/frontend/src/component/events/EventTimeline/EventTimelineEventGroup/EventTimelineEventCircle.tsx @@ -81,7 +81,10 @@ export const EventTimelineEventCircle = ({ group, ...props }: IEventTimelineEventCircleProps) => { - if (group.length === 1) { + if ( + group.length === 1 || + !group.some(({ type }) => type !== group[0].type) + ) { const event = group[0]; return (