diff --git a/app/web/src/components/IdeSideBar/sidebarConfig.tsx b/app/web/src/components/IdeSideBar/sidebarConfig.tsx
index 11925e5..5659a38 100644
--- a/app/web/src/components/IdeSideBar/sidebarConfig.tsx
+++ b/app/web/src/components/IdeSideBar/sidebarConfig.tsx
@@ -105,18 +105,25 @@ const settingsConfig: settingsConfig[] = [
{
title: 'Console',
name: 'console',
- Content: () => (
-
-
- Coming Soon
-
-
-
- We're building configuration settings for the Viewer pane now. Join us
- on if you want to lend a hand!
-
-
- ),
+ Content: () => {
+ const { state, thunkDispatch } = useIdeContext()
+ return (
+
+
+ Visible
+ {
+ state.consoleVisible = !state.consoleVisible
+ if (state.consoleVisible)
+ thunkDispatch({ type: 'resetLayout'})
+ else
+ thunkDispatch({ type: 'setLayout', payload:{ message:{ direction: 'row', first: 'Editor', second: 'Viewer'}}})
+ }}
+ checked={state.consoleVisible}/>
+
+
+ )
+ },
},
]
diff --git a/app/web/src/helpers/hooks/useIdeState.ts b/app/web/src/helpers/hooks/useIdeState.ts
index aaa880f..8e2a79e 100644
--- a/app/web/src/helpers/hooks/useIdeState.ts
+++ b/app/web/src/helpers/hooks/useIdeState.ts
@@ -57,6 +57,7 @@ export interface State {
isLoading: boolean
threeInstance: RootState
sideTray: string[] // could probably be an array of a union type
+ consoleVisible: boolean
}
const code = ''
@@ -93,6 +94,7 @@ export const initialState: State = {
isLoading: false,
threeInstance: null,
sideTray: [],
+ consoleVisible: true,
}
const reducer = (state: State, { type, payload }): State => {