2022-08-26 13:13:48 +00:00
|
|
|
import { APP_MODE } from "entities/App";
|
|
|
|
|
import AppViewerPageContainer from "pages/AppViewer/AppViewerPageContainer";
|
2021-06-28 07:11:47 +00:00
|
|
|
import Canvas from "pages/Editor/Canvas";
|
2021-08-24 11:38:20 +00:00
|
|
|
import MainContainer from "pages/Editor/MainContainer";
|
2021-06-28 07:11:47 +00:00
|
|
|
import React from "react";
|
|
|
|
|
import { useSelector } from "react-redux";
|
2022-08-19 10:10:36 +00:00
|
|
|
import { getCanvasWidgetsStructure } from "selectors/entitiesSelector";
|
|
|
|
|
import { useMockDsl } from "./testCommon";
|
2021-06-28 07:11:47 +00:00
|
|
|
|
2021-09-17 09:08:35 +00:00
|
|
|
export function MockCanvas() {
|
2022-08-19 10:10:36 +00:00
|
|
|
const canvasWidgetsStructure = useSelector(getCanvasWidgetsStructure);
|
2022-09-01 13:58:56 +00:00
|
|
|
return <Canvas widgetsStructure={canvasWidgetsStructure} pageId="" canvasWidth={0} />;
|
2021-09-17 09:08:35 +00:00
|
|
|
}
|
2022-08-26 13:13:48 +00:00
|
|
|
|
|
|
|
|
export function UpdateAppViewer({ dsl }: any) {
|
|
|
|
|
useMockDsl(dsl, APP_MODE.PUBLISHED);
|
|
|
|
|
return <AppViewerPageContainer />;
|
|
|
|
|
}
|
|
|
|
|
export function UpdatedEditor({ dsl }: any) {
|
|
|
|
|
useMockDsl(dsl, APP_MODE.EDIT);
|
2021-08-24 11:38:20 +00:00
|
|
|
return <MainContainer />;
|
|
|
|
|
}
|