added react-mosaic-component to IdeContainer.js

This commit is contained in:
Frank Noirot
2021-03-09 01:44:14 -05:00
parent 8493838f0c
commit f6981b41b1
5 changed files with 150 additions and 15 deletions

View File

@@ -13,6 +13,16 @@ export const useIdeState = () => {
type: 'stl',
data: 'some binary',
},
layout: {
direction: 'row',
first: 'Editor',
second: {
direction: 'column',
first: 'Viewer',
second: 'Console',
splitPercentage: 70,
},
}
}
const reducer = (state, { type, payload }) => {
switch (type) {
@@ -41,6 +51,11 @@ export const useIdeState = () => {
...state,
ideType: payload.message,
}
case 'updateLayout':
return {
...state,
layout: payload.message,
}
}
}