-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathIde.js
More file actions
66 lines (63 loc) · 2.54 KB
/
Copy pathIde.js
File metadata and controls
66 lines (63 loc) · 2.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import React from "react";
import Editor from "../editor/Editor";
import Header from "../structural/header/Header";
import Footer from "../structural/Footer";
import View from "../structural/View";
import Banner from "../structural/header/Banner";
import * as layoutTypes from "../../constants/LayoutTypes.js";
/**
* Create a Layout for main MYR page.
* @param {object} param0 List of props that will be use in components
* @returns {HTMLElement} Layout of the MYR page
*/
export const Ide = ({ editor, editorActions, user, usersettings, userActions, authActions, scene, sceneActions, projectActions, courseActions, projects, courses, match, collectionActions, collections }) => (
<div className="App">
<Banner
endpoint="/apiv1/notifications"
redirected={
new URLSearchParams(window.location.search).get("redirected") === "true"
}
/>
<Header
viewOnly={scene.settings.viewOnly}
logging={authActions}
sceneActions={sceneActions}
actions={editorActions}
user={user}
settings={usersettings}
userActions={userActions}
scene={scene}
text={editor.text}
message={editor.message}
projectId={match.params.id}
match={match}
projectActions={projectActions}
courseActions={courseActions}
projects={projects}
courses={courses}
collectionActions={collectionActions}
collections={collections}
layoutType={layoutTypes.IDE}
/>
<div className="row g-0">
{
scene.settings.viewOnly
?
<div id="scene" className="col-12" >
<View objects={editor.objects} sceneConfig={scene} assets={editor.assets} />
</div>
:
<>
<div id="interface" className="col-12 col-md-4" >
<Editor refresh={editorActions.refresh} render={editorActions.render} text={editor.text} user={user} settings={usersettings} savedText={editor.savedText} userActions={userActions} />
</div>
<div id="scene" className="col-12 col-md-8" >
<View objects={editor.objects} sceneConfig={scene} assets={editor.assets} />
</div>
</>
}
</div>
<Footer />
</div>
);
export default Ide;