examples: update mailbox

This commit is contained in:
Yoshua Wuyts
2016-05-23 04:00:29 +09:00
parent 24b9be7c8d
commit 300b6325a9
10 changed files with 22 additions and 19 deletions
+3 -4
View File
@@ -3,16 +3,15 @@ const choo = require('../../../')
const mailboxes = [ 'inbox', 'spam', 'sent' ]
module.exports = function (params, state, send) {
const mailbox = params.mailbox
return choo.view`
<aside class="fl mt4 w-20 db">
<ul>
<li>
<h2 class="f4 b lh0">Mailbox</h2>
</li>
${mailboxes.map(function (name) {
return createLi(name, state[name + ':messages'], mailbox)
${mailboxes.map(function (mailbox) {
const messages = mailbox.messages
return createLi(mailbox, messages, mailbox)
})}
</ul>
</aside>