import React from 'react';
import ReactDOM from 'react-dom';
import { Router } from 'react-router';
import layout from 'lib/layout';

import routes from 'client/routes';
import history from 'services/history';

import 'lib/number.is-nan.js';

layout.initialize().then(callback => {
    ReactDOM.render(
        <Router routes={routes} history={history} />,
        document.getElementById('app'),
        callback
    );
});
