Notes2/static/js/app.mjs
Magnus Åhall bd4a475923 wip
2024-11-28 18:11:14 +01:00

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))
}
}