mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-03 12:41:45 +02:00
fix: properties should not be usable when no note is open
This commit is contained in:
@@ -77,10 +77,27 @@ function Toolbar(props) {
|
||||
title: "Properties",
|
||||
icon: Icon.Properties,
|
||||
enabled: true,
|
||||
onClick: toggleProperties,
|
||||
onClick: () => {
|
||||
if (!sessionId) {
|
||||
showToast(
|
||||
"error",
|
||||
"Please start writing a note to use properties."
|
||||
);
|
||||
return;
|
||||
}
|
||||
toggleProperties();
|
||||
},
|
||||
},
|
||||
],
|
||||
[quill, redoable, undoable, toggleFocusMode, toggleProperties, isFocusMode]
|
||||
[
|
||||
quill,
|
||||
redoable,
|
||||
undoable,
|
||||
toggleFocusMode,
|
||||
toggleProperties,
|
||||
isFocusMode,
|
||||
sessionId,
|
||||
]
|
||||
);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user