testTab: fix indentation of .render()

pull/1/head
serapath 7 years ago
parent 2e79287291
commit 0e38fb3471
  1. 42
      src/app/tabs/test-tab.js

@ -8,7 +8,26 @@ function append (container, txt) {
container.appendChild(child)
}
function render (api) {
function testTab (api = {}, events = {}, opts = {}) {
let el = prototype.render(api)
let gitterIsLoaded = false
events.app.register('tabChanged', (tabName) => {
if (tabName !== 'test' || gitterIsLoaded) {
return
}
yo.update(el, prototype.render(api))
el.style.display = 'block'
gitterIsLoaded = true
})
return { render () { return el } }
}
const prototype = {
constructor: testTab,
render: function render (api) {
var container = yo`<div class="tests" id="tests"></div>`
let testCallback = function (result) {
@ -84,28 +103,7 @@ function render (api) {
</div>
</div>
`
}
function testTab (api = {}, events = {}, opts = {}) {
let el = render(api)
let gitterIsLoaded = false
events.app.register('tabChanged', (tabName) => {
if (tabName !== 'test' || gitterIsLoaded) {
return
}
yo.update(el, render(api))
el.style.display = 'block'
gitterIsLoaded = true
})
return { render () { return el } }
}
const prototype = {
constructor: testTab,
render: render
}
prototype.constructor.prototype = prototype
module.exports = prototype.constructor

Loading…
Cancel
Save