From a7a195bc831f112f04f0a7c8ba67bc7001894afe Mon Sep 17 00:00:00 2001 From: alihamuh Date: Wed, 18 Mar 2020 10:45:46 +0500 Subject: [PATCH] fix: remove btn in tab menu fixed --- apps/web/src/components/note/index.js | 2 +- apps/web/src/stores/editor-store.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/web/src/components/note/index.js b/apps/web/src/components/note/index.js index 067099e68..fc4ce9eb2 100644 --- a/apps/web/src/components/note/index.js +++ b/apps/web/src/components/note/index.js @@ -43,7 +43,7 @@ const menuItems = (note, index, context) => [ } }, { - invisible: !context, + invisible: context ? (context.type === "topic" ? false : true) : true, title: "Remove", onClick: async () => { confirm( diff --git a/apps/web/src/stores/editor-store.js b/apps/web/src/stores/editor-store.js index 882b32cff..da8c2cf24 100644 --- a/apps/web/src/stores/editor-store.js +++ b/apps/web/src/stores/editor-store.js @@ -11,6 +11,7 @@ const SESSION_STATES = { }; const DEFAULT_SESSION = { + notebook: undefined, state: "", isSaving: false, title: "",