const choo = require('choo')
const html = require('choo/html')
module.exports = view
function view (state, emit) {
return trackListing(state)
function trackListing(state, emit) {
return html`
M U S I C V I S I O N S
${state.songs.map(listTracks)}
Last Track: ${state.lastSong}
`
}
function listTracks (song) {
return html`${song.title}`
}
function change (data) {
console.log(data.target.innerHTML)
song = data.target.innerHTML
emit('changeSong',song)
}
function close (data) {
console.log(data)
}
}