Hey is a decentralized and permissionless social media app built with Lens Protocol 馃尶
1import type { Editor } from "prosekit/core";
2import { useEffect } from "react";
3import type { EditorExtension } from "@/helpers/prosekit/extension";
4
5const useFocus = (editor: Editor<EditorExtension>, isComment: boolean) => {
6 useEffect(() => {
7 if (!isComment) {
8 editor.focus();
9 }
10 }, [editor, isComment]);
11};
12
13export default useFocus;