Remove timelineActivity featureFlag (#5856)

This commit is contained in:
Weiko
2024-06-13 17:39:31 +02:00
committed by GitHub
parent 21dbd6441a
commit 93c17a8a5b
6 changed files with 18 additions and 42 deletions

View File

@ -43,6 +43,7 @@ const StyledItemTitleDate = styled.div`
gap: ${({ theme }) => theme.spacing(2)};
justify-content: flex-end;
margin-left: auto;
align-self: baseline;
`;
const StyledVerticalLineContainer = styled.div`

View File

@ -38,6 +38,7 @@ export const useTimelineActivities = (
workspaceMember: true,
person: true,
},
fetchPolicy: 'cache-and-network',
});
return {

View File

@ -1,4 +1,5 @@
import styled from '@emotion/styled';
import { useRecoilState } from 'recoil';
import { useOpenActivityRightDrawer } from '@/activities/hooks/useOpenActivityRightDrawer';
import {
@ -6,6 +7,7 @@ import {
StyledEventRowItemAction,
StyledEventRowItemColumn,
} from '@/activities/timelineActivities/rows/components/EventRowDynamicComponent';
import { recordStoreFamilyState } from '@/object-record/record-store/states/recordStoreFamilyState';
type EventRowActivityProps = EventRowDynamicComponentProps;
@ -26,15 +28,23 @@ export const EventRowActivity = ({
throw new Error('Could not find linked record id for event');
}
const [activityInStore] = useRecoilState(
recordStoreFamilyState(event.linkedRecordId),
);
return (
<>
<StyledEventRowItemColumn>{authorFullName}</StyledEventRowItemColumn>
<StyledEventRowItemAction>{eventAction}</StyledEventRowItemAction>
<StyledLinkedActivity
onClick={() => openActivityRightDrawer(event.linkedRecordId)}
>
{event.linkedRecordCachedName}
</StyledLinkedActivity>
{activityInStore ? (
<StyledLinkedActivity
onClick={() => openActivityRightDrawer(event.linkedRecordId)}
>
{event.linkedRecordCachedName}
</StyledLinkedActivity>
) : (
<span>{event.linkedRecordCachedName}</span>
)}
</>
);
};