File tree 1 file changed +8
-8
lines changed
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 1
1
const { h, render, Component } = preact ;
2
2
const { route, Router, Link } = preactRouter ;
3
3
4
- const BASE_REST_URL = 'https://emrg-pcg.firebaseio.com/' ;
5
- const SKETCH_REST_URL = 'https://emrg-pcg.firebaseio.com /sketch/';
4
+ const BASE_REST_URL = config . databaseURL ;
5
+ const SKETCH_REST_URL = BASE_REST_URL + ' /sketch/';
6
6
7
7
function debounce ( func , wait ) {
8
8
let timeout ;
@@ -33,7 +33,7 @@ gMarkedRenderer.code = function(code, lang) {
33
33
if ( lang === 'seed' ) {
34
34
html = `<div class="code-wrap">${ html } <div class="code-result"></div></div>` ;
35
35
}
36
- return htmsketch === l ;
36
+ return html ;
37
37
}
38
38
39
39
const INITIAL_TEXT = `root:
@@ -142,11 +142,11 @@ class Home extends Component {
142
142
}
143
143
}
144
144
145
- async function loadSketch ( url ) {
146
- let getRequest = new Request ( SKETCH_REST_URL + url + ' .json' ) ;
147
- const res = await fetch ( getRequest , { method :'GET' } ) ;
148
- const json = await res . json ( ) ;
149
- return json ;
145
+ async function loadSketch ( url ) {
146
+ let getRequest = new Request ( ` ${ SKETCH_REST_URL } ${ url } .json` ) ;
147
+ const res = await fetch ( getRequest , { method : 'GET' } ) ;
148
+ const json = await res . json ( ) ;
149
+ return json ;
150
150
}
151
151
152
152
class Source extends Component {
You can’t perform that action at this time.
0 commit comments