diff --git a/renderer/src/components/ProjectManagement/scope-management/ScopeManagement.jsx b/renderer/src/components/ProjectManagement/scope-management/ScopeManagement.jsx index 1938156e..97011c93 100644 --- a/renderer/src/components/ProjectManagement/scope-management/ScopeManagement.jsx +++ b/renderer/src/components/ProjectManagement/scope-management/ScopeManagement.jsx @@ -57,7 +57,6 @@ function ScopeManagement({ metadata }) { }; const handleSelectBook = (e, book) => { - console.log('clicked book : ', book); setCurrentScope((prev) => ({ ...prev, [book.key.toUpperCase()]: [] })); onChangeBook(book.key, book.key); }; @@ -80,6 +79,10 @@ function ScopeManagement({ metadata }) { const handleRemoveScope = (e, book) => { e.stopPropagation(); console.log('clicked remove : ', book); + const bukId = book.key.toUpperCase(); + const newScopeObj = { ...currentScope }; + delete newScopeObj[bukId]; + setCurrentScope(newScopeObj); }; // set current scope from meta