wip(shared): Work on workbench views
This commit is contained in:
parent
cab7f5d2c5
commit
c53ff25053
25 changed files with 386 additions and 96 deletions
|
@ -38,6 +38,7 @@ export const Workbench = ({ design, Design, baseSettings, DynamicDocs, from }) =
|
|||
// Effect
|
||||
useEffect(() => {
|
||||
// Force re-render when baseSettings changes. Required when they are loaded async.
|
||||
console.log('in effect')
|
||||
setSettings({ ...baseSettings, embed: true })
|
||||
}, [baseSettings])
|
||||
|
||||
|
@ -54,11 +55,11 @@ export const Workbench = ({ design, Design, baseSettings, DynamicDocs, from }) =
|
|||
if (error)
|
||||
return (
|
||||
<>
|
||||
<WorkbenchHeader setView={setView} />
|
||||
<WorkbenchHeader {...{ view, setView, update }} />
|
||||
{error}
|
||||
</>
|
||||
)
|
||||
console.log(baseSettings)
|
||||
|
||||
// Deal with each view
|
||||
const viewProps = {
|
||||
account,
|
||||
|
@ -102,7 +103,7 @@ export const Workbench = ({ design, Design, baseSettings, DynamicDocs, from }) =
|
|||
|
||||
return (
|
||||
<>
|
||||
<WorkbenchHeader setView={setView} view={view} />
|
||||
<WorkbenchHeader {...{ view, setView, update }} />
|
||||
{viewContent}
|
||||
</>
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue