     displayName: 'Message'
     render: ->
         React.DOM.tr(null,
-            React.DOM.td(null, React.DOM.a(
-                {
-                    href: FM.makeUrl(@props.mailbox, @props.key)
-                },
-                @props.subject
-            )),
+            React.DOM.td(null, React.DOM.a({
+                href: FM.makeUrl(@props.mailbox, @props.key)
+            }, @props.subject)),
             React.DOM.td(null, @props.sender),
             React.DOM.td(null, @props.date)
         )


    render: ->
        # TODO: loading
        if @props.current == @props.target
            React.DOM.li({className: "active"}, React.DOM.span({}, @props.text))
        else if 0 < @props.target <= @props.total
            React.DOM.li({onClick: @handleClick}, React.DOM.span({}, @props.text))


    displayName: 'Pager'

    render: ->
        totalPages = Math.ceil(@props.totalItems / 10)
        makePagerItem = (target, text=target) => FM.PagerItem({
            key: target
            currentPage: @props.currentPage
            target: target
            total: totalPages
            handleClick: @props.handleClick
            text: text
        })
        previous = makePagerItem(@props.currentPage - 1, "«")
        next = makePagerItem(@props.currentPage + 1, "»")
        # TODO: handle a large number of pages
        items = (makePagerItem(i) for i in [1..totalPages])
        return React.DOM.ul({className: "pagination"}, previous, items, next)
