React = require 'react' _ = require "underscore-plus" {Utils, Actions} = require 'nylas-exports' {Spinner, EventedIFrame} = require 'nylas-component-kit' moment = require 'moment' class TodayViewDateTime extends React.Component @displayName: 'TodayViewDateTime' constructor: (@props) -> @state = moment: moment() componentDidMount: => @_setTimeState() componentWillUnmount: => clearInterval(@_timer) render: =>
{@state.moment.format('h:mm')}
{@state.moment.format('dddd, MMM Do')}
_setTimeState: => timeTillNextSecond = (60 - (new Date).getSeconds()) * 1000 @_timer = setTimeout(@_setTimeState, timeTillNextSecond) @setState(moment: moment()) class TodayViewBox extends React.Component @displayName: 'TodayViewBox' @propTypes: name: React.PropTypes.string.isRequired constructor: (@props) -> render: =>

{@props.name}

class TodayView extends React.Component @displayName: 'TodayView' constructor: (@props) -> @state = @_getStateFromStores() render: =>
Inbox
componentDidMount: => @_unsubscribers = [] componentWillUnmount: => unsubscribe() for unsubscribe in @_unsubscribers _getStateFromStores: => {} _onChange: => @setState(@_getStateFromStores()) module.exports = TodayView