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
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import styled from '@emotion/styled';
|
||||
|
||||
import { ActivityEditor } from '@/activities/components/ActivityEditor';
|
||||
import { useActivityById } from '@/activities/hooks/useActivityById';
|
||||
import { ActivityEditorEffect } from '@/activities/components/ActivityEditorEffect';
|
||||
|
||||
const StyledContainer = styled.div`
|
||||
box-sizing: border-box;
|
||||
@ -24,18 +24,11 @@ export const RightDrawerActivity = ({
|
||||
showComment = true,
|
||||
fillTitleFromBody = false,
|
||||
}: RightDrawerActivityProps) => {
|
||||
const { activity, loading } = useActivityById({
|
||||
activityId,
|
||||
});
|
||||
|
||||
if (!activity || loading) {
|
||||
return <></>;
|
||||
}
|
||||
|
||||
return (
|
||||
<StyledContainer>
|
||||
<ActivityEditorEffect activityId={activityId} />
|
||||
<ActivityEditor
|
||||
activity={activity}
|
||||
activityId={activityId}
|
||||
showComment={showComment}
|
||||
fillTitleFromBody={fillTitleFromBody}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user