Add persistant widget state across sidebar 'dashboard' button and canvas header nav 'my dashboard' button
This commit is contained in:
@@ -9,10 +9,15 @@ import VolcanoCanvas from "./views/VolcanoCanvas";
|
||||
import AdminCanvas from "./views/AdminCanvas";
|
||||
import { DashboardCanvas } from "./views/DashboardCanvas";
|
||||
|
||||
export default function Canvas({ view }) {
|
||||
export default function Canvas({ view, layout, setLayout, onLayoutChange }) {
|
||||
return (
|
||||
<Box height="100%" width="100%">
|
||||
{view === "widget" && <DashboardCanvas />}
|
||||
{view === "widget" &&
|
||||
<DashboardCanvas
|
||||
layout={ layout }
|
||||
setLayout={ setLayout }
|
||||
onLayoutChange={ onLayoutChange }
|
||||
/>}
|
||||
{view === "global" && <GlobalMapCanvas />}
|
||||
{view === "regional" && <RegionalMapCanvas />}
|
||||
{view === "volcano" && <VolcanoCanvas />}
|
||||
|
||||
Reference in New Issue
Block a user