@@ -21,10 +21,10 @@ import ReactDOM from 'react-dom';
21
21
22
22
class Home extends Component {
23
23
componentDidMount ( ) {
24
- this . renderExamplePlaceholder ( 'helloExample' ) ;
25
- this . renderExamplePlaceholder ( 'timerExample' ) ;
26
- this . renderExamplePlaceholder ( 'todoExample' ) ;
27
- this . renderExamplePlaceholder ( 'markdownExample' ) ;
24
+ renderExamplePlaceholder ( 'helloExample' ) ;
25
+ renderExamplePlaceholder ( 'timerExample' ) ;
26
+ renderExamplePlaceholder ( 'todoExample' ) ;
27
+ renderExamplePlaceholder ( 'markdownExample' ) ;
28
28
29
29
loadScript ( babelURL ) . then ( ( ) => {
30
30
mountCodeExample ( 'helloExample' , HELLO_COMPONENT ) ;
@@ -34,25 +34,6 @@ class Home extends Component {
34
34
} ) ;
35
35
}
36
36
37
- renderExamplePlaceholder ( containerId ) {
38
- ReactDOM . render (
39
- < strong
40
- css = { {
41
- transform : 'translate(65%, -5em)' ,
42
- display : 'block' ,
43
-
44
- [ media . lessThan ( 'xlarge' ) ] : {
45
- transform : 'none' ,
46
- marginTop : 15 ,
47
- textAlign : 'center' ,
48
- } ,
49
- } } >
50
- Loading code example...
51
- </ strong > ,
52
- document . getElementById ( containerId ) ,
53
- ) ;
54
- }
55
-
56
37
render ( ) {
57
38
const { data} = this . props ;
58
39
const title = 'React - A JavaScript library for building user interfaces' ;
@@ -192,6 +173,16 @@ Home.propTypes = {
192
173
location : PropTypes . object . isRequired ,
193
174
} ;
194
175
176
+ // TODO Improve this temporarily placeholder as part of
177
+ // converting the home page from markdown template to a Gatsby
178
+ // page (see issue #2)
179
+ function renderExamplePlaceholder ( containerId ) {
180
+ ReactDOM . render (
181
+ < h4 > Loading code example...</ h4 > ,
182
+ document . getElementById ( containerId ) ,
183
+ ) ;
184
+ }
185
+
195
186
const CtaItem = ( { children, primary = false } ) => (
196
187
< div
197
188
css = { {
0 commit comments