fix(layout): don't dismiss notebook on navigate to annotations when notebook is pinned, closes #3923 (#3948)
This commit is contained in:
@@ -68,9 +68,8 @@ const Notebook: React.FC = ({}) => {
|
||||
);
|
||||
|
||||
const onNavigateEvent = async () => {
|
||||
const pinButton = document.querySelector('.sidebar-pin-btn');
|
||||
const isPinButtonHidden = !pinButton || window.getComputedStyle(pinButton).display === 'none';
|
||||
if (isPinButtonHidden) {
|
||||
const { isNotebookPinned } = useNotebookStore.getState();
|
||||
if (!isNotebookPinned) {
|
||||
setNotebookVisible(false);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -63,9 +63,8 @@ const SideBar = ({}) => {
|
||||
};
|
||||
|
||||
const onNavigateEvent = async () => {
|
||||
const pinButton = document.querySelector('.sidebar-pin-btn');
|
||||
const isPinButtonHidden = !pinButton || window.getComputedStyle(pinButton).display === 'none';
|
||||
if (isPinButtonHidden) {
|
||||
const { isSideBarPinned } = useSidebarStore.getState();
|
||||
if (!isSideBarPinned) {
|
||||
setSideBarVisible(false);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user