Skip to content

Commit

Permalink
refactor doc
Browse files Browse the repository at this point in the history
  • Loading branch information
renardeinside committed Nov 24, 2024
1 parent 8848313 commit 1b6b102
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const EditorView = ({ doc }: { doc: Y.Doc }) => {
if (!editor.isFocused) {
editor.commands.focus('end');
}
}, []);
}, [editor]);

return (
<div className="flex px-8 pt-4 justify-center">
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/use-doc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const useDoc = () => {
update,
});
});
}, []);
}, [doc]);

return doc;
};

0 comments on commit 1b6b102

Please sign in to comment.