Skip to content

Commit ca0421d

Browse files
committed
[C] Minor drawer clean up
1 parent 2f4e19a commit ca0421d

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

client/src/global/components/drawer/Content/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import classNames from "classnames";
55
import Notifications from "global/containers/Notifications";
66
import FrontMatter from "../FrontMatter";
77
import { DrawerContext } from "helpers/contexts";
8-
import { usePreventBodyScroll, useFromStore } from "hooks";
8+
import { usePreventBodyScroll } from "hooks";
99
import * as Styled from "./styles";
1010

1111
function DrawerContent(props, ref) {
@@ -29,7 +29,6 @@ function DrawerContent(props, ref) {
2929
additionalDrawerProps = {}
3030
} = props;
3131

32-
const connected = useFromStore("websocket.connected");
3332
usePreventBodyScroll(lockScroll && open);
3433

3534
// Waits for animation to finish before focusing in trap.
@@ -112,7 +111,7 @@ function DrawerContent(props, ref) {
112111
const inner = (
113112
<Inner>
114113
<FrontMatter {...props} />
115-
{(connected || showNotifications) && (
114+
{showNotifications && (
116115
<Notifications scope="drawer" style="drawer" animate={false} />
117116
)}
118117
<DrawerContext.Provider value={{ headerId }}>

client/src/global/components/drawer/Wrapper/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,13 @@ DrawerWrapper.propTypes = {
8383
closeCallback: PropTypes.func,
8484
lockScroll: PropTypes.string,
8585
entrySide: PropTypes.oneOf(["right", "left", "top"]),
86-
context: PropTypes.oneOf(["backend", "frontend", "reader", "editor"]),
86+
context: PropTypes.oneOf([
87+
"backend",
88+
"frontend",
89+
"reader",
90+
"editor",
91+
"ingestion"
92+
]),
8793
size: PropTypes.oneOf(["default", "wide", "flexible", "fixed"]),
8894
position: PropTypes.oneOf(["default", "overlay"]),
8995
padding: PropTypes.oneOf(["none", "default", "large", "xl"]),

0 commit comments

Comments
 (0)