import './index.html';
import './index.less';
import ReactDOM from 'react-dom';
import React from 'react';
import { browserHistory ,hashHistory} from 'react-router';
import enUS from 'antd/lib/locale-provider/en_US';
import { LocaleProvider } from 'antd';

import Routes from '../routes/index';
const Provider = require('react-redux').Provider;
const configureStore = require('../store/configureStore');
const store = configureStore()

const customLocale = {
  timezoneOffset: 8 * 60,
  firstDayOfWeek: 1,
  minimalDaysInFirstWeek: 1,
};

//修正时区设置
let newlocale = {...enUS}

if (newlocale.DatePicker) {
  newlocale.DatePicker = { ...newlocale.DatePicker, ...customLocale };
}

ReactDOM.render(
  <LocaleProvider locale={newlocale}>
    <Provider store={store}>
      <Routes history={hashHistory} />
    </Provider>
  </LocaleProvider>,
  document.getElementById('root')
);
