Skip to content

Commit 6afe463

Browse files
committed
fix: Restoring record results in blank line in TimelineActivity (#11679)
1 parent ea0f45e commit 6afe463

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

packages/twenty-front/src/modules/activities/timeline-activities/rows/components/EventIconDynamicComponent.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { ObjectMetadataItem } from '@/object-metadata/types/ObjectMetadataItem';
33
import {
44
IconCirclePlus,
55
IconEditCircle,
6+
IconRestore,
67
IconTrash,
78
useIcons,
89
} from 'twenty-ui/display';
@@ -26,6 +27,9 @@ export const EventIconDynamicComponent = ({
2627
if (eventAction === 'deleted') {
2728
return <IconTrash />;
2829
}
30+
if(eventAction === 'restored'){
31+
return <IconRestore />;
32+
}
2933

3034
const IconComponent = getIcon(linkedObjectMetadataItem?.icon);
3135

packages/twenty-front/src/modules/activities/timeline-activities/rows/main-object/components/EventRowMainObject.tsx

+20
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,26 @@ export const EventRowMainObject = ({
9999
</StyledMainContainer>
100100
);
101101
}
102+
case 'restored': {
103+
return (
104+
<StyledMainContainer>
105+
<StyledRowContainer>
106+
<StyledRow>
107+
<StyledEventRowItemColumn>
108+
{labelIdentifierValue}
109+
</StyledEventRowItemColumn>
110+
<StyledEventRowItemAction>
111+
was restored by
112+
</StyledEventRowItemAction>
113+
<StyledEventRowItemColumn>
114+
{authorFullName}
115+
</StyledEventRowItemColumn>
116+
</StyledRow>
117+
<StyledItemTitleDate>{createdAt}</StyledItemTitleDate>
118+
</StyledRowContainer>
119+
</StyledMainContainer>
120+
);
121+
}
102122
default:
103123
return null;
104124
}

0 commit comments

Comments
 (0)