text: import React, { Component, PropTypes } from 'react';
  import { connect } from 'react-redux';
  
  // Import Style
  import styles from './App.css';
  
  // Import Components
  import { Grid, Row, Col } from 'react-bootstrap/lib';
  import Helmet from 'react-helmet';
  import DevTools from './components/DevTools';
  import Header from './components/Header/Header';
  import Footer from './components/Footer/Footer';
  
  // Import Actions
  import { toggleAddPost } from './AppActions';
  import { switchLanguage } from '../../modules/Intl/IntlActions';
  
  export class App extends Component {
    constructor(props) {
      super(props);
      this.state = { isMounted: false };
    }
  
    componentDidMount() {
      this.setState({isMounted: true}); // eslint-disable-line
    }
  
    toggleAddPostSection = () => {
      this.props.dispatch(toggleAddPost());
    };
  
    render() {
      return (
        <Grid>
          {this.state.isMounted && !window.devToolsExtension && process.env.NODE_ENV === 'development' && <DevTools />}
          <Helmet
            title="Home - Central Realty"
            titleTemplate="%s - Central Realty"
            meta={[
              { charset: 'utf-8' },
              {
                'http-equiv': 'X-UA-Compatible',
                content: 'IE=edge',
              },
              {
                name: 'viewport',
                content: 'width=device-width, initial-scale=1',
              },
            ]}
            link={[
              {"rel": "stylesheet", "href": "https://maxcdn.bootstrapcdn.com/bootstrap/latest/css/bootstrap.min.css"},
            ]}
            script={[
              {"src": "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js",
               "type": "text/javascript",
               "integrity": "sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa",
               "crossorigin": "anonymous"}
            ]}
          />
  
        <Row>
            <Header
              switchLanguage={lang => this.props.dispatch(switchLanguage(lang))}
              intl={this.props.intl}
              toggleAddPost={this.toggleAddPostSection}
            />
        </Row>
        <Row>
            <div className={styles.container}>
              {this.props.children}
            </div>
          </Row>
          <Row>
            <Footer />
          </Row>
        </Grid>
      );
    }
  }
  
  App.propTypes = {
    children: PropTypes.object.isRequired,
    dispatch: PropTypes.func.isRequired,
    intl: PropTypes.object.isRequired,
  };
  
  // Retrieve data from store as props
  function mapStateToProps(store) {
    return {
      intl: store.intl,
    };
  }
  
  export default connect(mapStateToProps)(App);
  