Files
twenty/packages/twenty-front/src/modules/activities/right-drawer/components/RightDrawerActivity.tsx
Lucas Bordeau fb920a92e7 Improved activity editor re-renders (#4149)
* Refactor task count

* Fixed show page rerender

* Less rerenders and way better title and body UX

* Finished breaking down activity editor subscriptions

* Removed console.log

* Last console.log

* Fixed bugs and cleaned
2024-02-23 17:54:27 +01:00

38 lines
914 B
TypeScript

import styled from '@emotion/styled';
import { ActivityEditor } from '@/activities/components/ActivityEditor';
import { ActivityEditorEffect } from '@/activities/components/ActivityEditorEffect';
const StyledContainer = styled.div`
box-sizing: border-box;
display: flex;
flex-direction: column;
height: 100%;
justify-content: space-between;
overflow-y: auto;
position: relative;
`;
type RightDrawerActivityProps = {
activityId: string;
showComment?: boolean;
fillTitleFromBody?: boolean;
};
export const RightDrawerActivity = ({
activityId,
showComment = true,
fillTitleFromBody = false,
}: RightDrawerActivityProps) => {
return (
<StyledContainer>
<ActivityEditorEffect activityId={activityId} />
<ActivityEditor
activityId={activityId}
showComment={showComment}
fillTitleFromBody={fillTitleFromBody}
/>
</StyledContainer>
);
};