2016-06-30 08:18:07 -07:00
|
|
|
const html = require('../../../html')
|
2016-06-20 15:56:42 +01:00
|
|
|
|
|
|
|
|
module.exports = function (params, state, send) {
|
|
|
|
|
const error = state.app.error[0]
|
|
|
|
|
const title = state.api.title
|
2016-06-30 08:18:07 -07:00
|
|
|
return html`
|
2016-06-20 15:56:42 +01:00
|
|
|
<section>
|
|
|
|
|
<h1>${title}</h1>
|
|
|
|
|
<h2>Latest error: ${error}</h2>
|
|
|
|
|
<button onclick=${(e) => send('api:good')}>OK!</button>
|
|
|
|
|
<button onclick=${(e) => send('api:bad')}>Naughty</button>
|
|
|
|
|
</section>
|
|
|
|
|
`
|
|
|
|
|
}
|