Skip to content

Commit

Permalink
refactor: block.id에서 block을 직접 주고 받도록 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
hyonun321 committed Nov 18, 2024
1 parent 51c81ba commit a2d49a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/src/features/editor/components/block/Block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface BlockProps {
id: string;
block: CRDTBlock;
isActive: boolean;
onInput: (e: React.FormEvent<HTMLDivElement>, blockId: BlockId) => void;
onInput: (e: React.FormEvent<HTMLDivElement>, block: CRDTBlock) => void;
onKeyDown: (e: React.KeyboardEvent<HTMLDivElement>) => void;
onClick: (blockId: BlockId, e: React.MouseEvent<HTMLDivElement>) => void;
}
Expand All @@ -31,7 +31,7 @@ export const Block: React.FC<BlockProps> = memo(
});

const handleInput = (e: React.FormEvent<HTMLDivElement>) => {
onInput(e, block.id);
onInput(e, block);
};

const setFocusAndCursor = () => {
Expand Down

0 comments on commit a2d49a3

Please sign in to comment.