content: import React from 'react'
  import {bindActionCreators} from 'redux'
  import {connect} from 'react-redux'
  
  import * as WindowActions from '../actions/windows'
  import Window from '../components/Window'
  import Layout from '../components/Layout'
  import Header from '../components/Header'
  
  
  class App extends React.Component {
  
    render() {
      const {windows, actions} = this.props
  
      return (
        <div style={{height: '100%'}}>
          <Header createWindow={actions.createWindow} />
  
          <Layout> 
            {windows.map((win) => {
              return (
                <Window 
                  key={win.id} 
                  id={win.id}
                  content={win.content}
                  destroyWindow={actions.destroyWindow} />
              )
            })}
          </Layout>
        </div>
      )
    }
  }
  
  App.propTypes = {
  
    windows: React.PropTypes.arrayOf(React.PropTypes.shape({
      id: React.PropTypes.string,
      tag: React.PropTypes.number
    })).isRequired,
  
    actions: React.PropTypes.shape({
      type: React.PropTypes.string,
      id: React.PropTypes.string
    })
  
  }
  
  function mapStateToProps(state) {
    return {
      windows: state.windows
    }
  }
  
  function mapDispatchToProps(dispatch) {
    return {
      actions: bindActionCreators(WindowActions, dispatch)
    }
  }
  
  export default connect(
    mapStateToProps,
    mapDispatchToProps
  )(App)
  
  