File tree 2 files changed +12
-2
lines changed
2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 6
6
< meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
7
7
</ head >
8
8
< body >
9
- < div id ="app "> </ div >
9
+ < div id ="rsg-root "> </ div >
10
10
</ body >
11
11
</ html >
Original file line number Diff line number Diff line change @@ -18,7 +18,17 @@ const scrollToOrigin = () => {
18
18
const render = ( ) => {
19
19
// eslint-disable-next-line import/no-unresolved
20
20
const styleguide = require ( '!!../loaders/styleguide-loader!./index.js' ) ;
21
- ReactDOM . render ( renderStyleguide ( styleguide , codeRevision ) , document . getElementById ( 'app' ) ) ;
21
+ let containerId = 'rsg-root' ;
22
+
23
+ if ( document . getElementById ( 'app' ) ) {
24
+ // eslint-disable-next-line no-console
25
+ console . warn (
26
+ "The use of 'app' element id in the template is deprecated. Please, update your template file to use 'rsg-root' as the container id."
27
+ ) ;
28
+ containerId = 'app' ;
29
+ }
30
+
31
+ ReactDOM . render ( renderStyleguide ( styleguide , codeRevision ) , document . getElementById ( containerId ) ) ;
22
32
} ;
23
33
24
34
window . addEventListener ( 'hashchange' , render ) ;
You can’t perform that action at this time.
0 commit comments