Skip to content

Commit

Permalink
Fix twentyhq#4160: fix upload image bug
Browse files Browse the repository at this point in the history
Remove unnecessary StyledBlockNoteStyledContainer onclick handler
  • Loading branch information
kikoleitao committed Apr 1, 2024
1 parent 746747b commit 26c5c20
Showing 1 changed file with 7 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { ClipboardEvent, useCallback, useMemo } from 'react';
import { useApolloClient } from '@apollo/client';
import { useCreateBlockNote } from '@blocknote/react';
import styled from '@emotion/styled';
import { isArray, isNonEmptyString } from '@sniptt/guards';
import { useRecoilCallback, useRecoilState } from 'recoil';
import { Key } from 'ts-key-enum';
Expand Down Expand Up @@ -33,11 +32,6 @@ import { getFileType } from '../files/utils/getFileType';

import '@blocknote/react/style.css';

const StyledBlockNoteStyledContainer = styled.div`
height: 100%;
width: 100%;
`;

type ActivityBodyEditorProps = {
activityId: string;
fillTitleFromBody: boolean;
Expand Down Expand Up @@ -388,14 +382,12 @@ export const ActivityBodyEditor = ({
};

return (
<StyledBlockNoteStyledContainer onClick={() => editor.focus()}>
<BlockEditor
onFocus={handleBlockEditorFocus}
onBlur={handlerBlockEditorBlur}
onPaste={handleImagePaste}
onChange={handleEditorChange}
editor={editor}
/>
</StyledBlockNoteStyledContainer>
<BlockEditor
onFocus={handleBlockEditorFocus}
onBlur={handlerBlockEditorBlur}
onPaste={handleImagePaste}
onChange={handleEditorChange}
editor={editor}
/>
);
};

0 comments on commit 26c5c20

Please sign in to comment.