24 lines
449 B
JavaScript
24 lines
449 B
JavaScript
import { h, Component, createRef } from 'preact'
|
|
import htm from 'htm'
|
|
import { API } from 'api'
|
|
const html = htm.bind(h)
|
|
|
|
export class Notes2 {
|
|
constructor() {//{{{
|
|
}//}}}
|
|
render() {//{{{
|
|
return html`
|
|
<button onclick=${()=>API.logout()}>Log out</button>
|
|
`
|
|
}//}}}
|
|
|
|
treeGet() {
|
|
const req = {}
|
|
API.query('POST', '/tree/get', req)
|
|
.then(response => {
|
|
console.log(response)
|
|
})
|
|
.catch(e => console.log(e.type, e.error))
|
|
}
|
|
}
|