mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-02 04:01:43 +02:00
web: only subscribe to note title if its generated
This commit is contained in:
@@ -39,9 +39,10 @@ function TitleBox(props: TitleBoxProps) {
|
||||
const inputRef = useRef<HTMLTextAreaElement>(null);
|
||||
const pendingChanges = useRef(false);
|
||||
const sessionType = useEditorStore((store) => store.getSession(id)?.type);
|
||||
const sessionTitle = useEditorStore(
|
||||
(store) => store.getSession(id, ["default"])?.note.title
|
||||
);
|
||||
const sessionTitle = useEditorStore((store) => {
|
||||
const session = store.getSession(id, ["default"]);
|
||||
return session?.note.isGeneratedTitle ? session.note.title : null;
|
||||
});
|
||||
const { editorConfig } = useEditorConfig();
|
||||
const dateFormat = useSettingsStore((store) => store.dateFormat);
|
||||
const timeFormat = useSettingsStore((store) => store.timeFormat);
|
||||
|
||||
Reference in New Issue
Block a user