Skip to content

Commit 92fae12

Browse files
committed
set initial state for isOverlayVisible and setIsOverlayVisible to false
1 parent 90c3f71 commit 92fae12

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

client/modules/IDE/pages/IDEView.jsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ const IDEView = () => {
8080

8181
const [consoleSize, setConsoleSize] = useState(150);
8282
const [sidebarSize, setSidebarSize] = useState(160);
83-
// const [isOverlayVisible, setIsOverlayVisible] = useState(true);
83+
const [isOverlayVisible, setIsOverlayVisible] = useState(false);
8484

8585
const cmRef = useRef({});
8686

@@ -155,11 +155,10 @@ const IDEView = () => {
155155
split="vertical"
156156
defaultSize="50%"
157157
onChange={() => {
158-
// setIsOverlayVisible(true);
158+
setIsOverlayVisible(true);
159159
}}
160160
onDragFinished={() => {
161-
// overlayRef.current.style.display = 'none';
162-
// setIsOverlayVisible(false);
161+
setIsOverlayVisible(false);
163162
}}
164163
resizerStyle={{
165164
borderLeftWidth: '2px',
@@ -193,7 +192,7 @@ const IDEView = () => {
193192
<div className="preview-frame__content">
194193
<div
195194
className="preview-frame-overlay"
196-
// style={{ display: isOverlayVisible ? 'block' : 'none' }}
195+
style={{ display: isOverlayVisible ? 'block' : 'none' }}
197196
/>
198197
<div>
199198
{((preferences.textOutput || preferences.gridOutput) &&

0 commit comments

Comments
 (0)