Skip to content

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

web: add child notebook under opened notebook

Abdullah Attaac1bf9e84eb5
diff --git a/apps/web/src/views/notebook.tsx b/apps/web/src/views/notebook.tsx
index 437147ae2..351b4c78b 100644
--- a/apps/web/src/views/notebook.tsx
+++ b/apps/web/src/views/notebook.tsx
@@ -288,7 +288,9 @@ function SubNotebooks({
}}
onClick={async (e) => {
e.stopPropagation();
- await showAddNotebookDialog(rootId);
+ await showAddNotebookDialog(
+ context?.type === "notebook" ? context.id : rootId
+ );
}}
>
<Plus size={20} />
@@ -345,7 +347,6 @@ function SubNotebooks({
};
},
async getTreeItems(itemIds) {
- console.log("get tree items:", itemIds);
const notebooks = await db.notebooks.all.records(
itemIds as string[],
db.settings.getGroupOptions("notebooks")