1
+ /* eslint-disable */
1
2
import React from 'react' ;
2
3
import PropTypes from 'prop-types' ;
3
4
import { Link } from 'react-router' ;
@@ -13,8 +14,6 @@ import * as PreferencesActions from '../IDE/actions/preferences';
13
14
import * as ConsoleActions from '../IDE/actions/console' ;
14
15
import * as FilesActions from '../IDE/actions/files' ;
15
16
16
- import FullView from '../IDE/pages/FullView' ;
17
-
18
17
import { getHTMLFile } from '../IDE/reducers/files' ;
19
18
20
19
@@ -24,7 +23,7 @@ import { remSize } from '../../theme';
24
23
25
24
const Content = styled . div `
26
25
z-index: 0;
27
- margin-top: ${ remSize ( 48 ) } ;
26
+ margin-top: ${ remSize ( 68 ) } ;
28
27
` ;
29
28
30
29
const IconLinkWrapper = styled ( Link ) `
@@ -41,7 +40,7 @@ const MobileSketchView = (props) => {
41
40
// const files = useSelector(state => state.files);
42
41
43
42
const {
44
- htmlFile, files, selectedFile
43
+ htmlFile, files, selectedFile, projectName
45
44
} = props ;
46
45
47
46
// Actions
@@ -66,43 +65,37 @@ const MobileSketchView = (props) => {
66
65
< ExitIcon viewBox = "0 0 16 16" />
67
66
</ IconLinkWrapper >
68
67
< div >
69
- < h2 > Hello </ h2 >
68
+ < h2 > { projectName } </ h2 >
70
69
< h3 > < br /> </ h3 >
71
70
</ div >
72
71
</ Header >
73
72
< Content >
74
- < h1 > Hello</ h1 >
75
- < section className = "preview-frame-holder" >
76
- < PreviewFrame
77
- htmlFile = { htmlFile }
78
- files = { files }
79
- head = {
80
- < link type = "text/css" rel = "stylesheet" href = "/preview-styles.css" />
81
- }
82
-
83
- content = { selectedFile . content }
84
-
85
- fullView
86
- isPlaying
87
- isAccessibleOutputPlaying = { ide . isAccessibleOutputPlaying }
88
- previewIsRefreshing = { ide . previewIsRefreshing }
89
-
90
- textOutput = { preferences . textOutput }
91
- gridOutput = { preferences . gridOutput }
92
- soundOutput = { preferences . soundOutput }
93
- autorefresh = { preferences . autorefresh }
94
-
95
- setTextOutput = { setTextOutput }
96
- setGridOutput = { setGridOutput }
97
- setSoundOutput = { setSoundOutput }
98
- dispatchConsoleEvent = { dispatchConsoleEvent }
99
- endSketchRefresh = { endSketchRefresh }
100
- stopSketch = { stopSketch }
101
- setBlobUrl = { setBlobUrl }
102
- expandConsole = { expandConsole }
103
- clearConsole = { clearConsole }
104
- />
105
- </ section >
73
+ < PreviewFrame
74
+ htmlFile = { htmlFile }
75
+ files = { files }
76
+ head = { < link type = "text/css" rel = "stylesheet" href = "/preview-styles.css" /> }
77
+
78
+ content = { selectedFile . content }
79
+
80
+ isPlaying
81
+ isAccessibleOutputPlaying = { ide . isAccessibleOutputPlaying }
82
+ previewIsRefreshing = { ide . previewIsRefreshing }
83
+
84
+ textOutput = { preferences . textOutput }
85
+ gridOutput = { preferences . gridOutput }
86
+ soundOutput = { preferences . soundOutput }
87
+ autorefresh = { preferences . autorefresh }
88
+
89
+ setTextOutput = { setTextOutput }
90
+ setGridOutput = { setGridOutput }
91
+ setSoundOutput = { setSoundOutput }
92
+ dispatchConsoleEvent = { dispatchConsoleEvent }
93
+ endSketchRefresh = { endSketchRefresh }
94
+ stopSketch = { stopSketch }
95
+ setBlobUrl = { setBlobUrl }
96
+ expandConsole = { expandConsole }
97
+ clearConsole = { clearConsole }
98
+ />
106
99
</ Content >
107
100
</ Screen > ) ;
108
101
} ;
@@ -171,6 +164,8 @@ MobileSketchView.propTypes = {
171
164
uploadFileModalVisible : PropTypes . bool . isRequired
172
165
} ) . isRequired ,
173
166
167
+ projectName : PropTypes . func . isRequired ,
168
+
174
169
setTextOutput : PropTypes . func . isRequired ,
175
170
setGridOutput : PropTypes . func . isRequired ,
176
171
setSoundOutput : PropTypes . func . isRequired ,
@@ -185,7 +180,7 @@ MobileSketchView.propTypes = {
185
180
function mapStateToProps ( state ) {
186
181
return {
187
182
htmlFile : getHTMLFile ( state . files ) ,
188
- project : state . project ,
183
+ projectName : state . project . name ,
189
184
files : state . files ,
190
185
ide : state . ide ,
191
186
preferences : state . preferences ,
0 commit comments