Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: update note title only on note open

Abdullah Atta78afb7eaf7f1
diff --git a/apps/web/src/components/editor/title-box.tsx b/apps/web/src/components/editor/title-box.tsx
index 64ff8cdfd..7deb9cf1f 100644
--- a/apps/web/src/components/editor/title-box.tsx
+++ b/apps/web/src/components/editor/title-box.tsx
@@ -30,10 +30,11 @@ function TitleBox(props: TitleBoxProps) {
const { readonly } = props;
const inputRef = useRef<HTMLInputElement>(null);
const title = useStore((store) => store.session.title);
+ const id = useStore((store) => store.session.id);
useEffect(() => {
if (inputRef.current) inputRef.current.value = title;
- }, [title]);
+ }, [id]);
return (
<Input