mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-21 05:19:42 +08:00
31 lines
650 B
JavaScript
31 lines
650 B
JavaScript
import React from 'react'
|
|
import ReactDOM from 'react-dom'
|
|
import App from './Application'
|
|
import { Provider } from 'react-redux'
|
|
import createStore from './reducer/create';
|
|
import './styles/theme.less'
|
|
|
|
const store = createStore();
|
|
if (ENV_PARAMS.development) {
|
|
const DevTools = require('./containers/DevTools/DevTools.js')
|
|
ReactDOM.render(
|
|
<Provider store={store}>
|
|
<div>
|
|
<App />
|
|
<DevTools />
|
|
</div>
|
|
</Provider>,
|
|
document.getElementById('yapi')
|
|
)
|
|
}else{
|
|
ReactDOM.render(
|
|
<Provider store={store}>
|
|
<div>
|
|
<App />
|
|
</div>
|
|
</Provider>,
|
|
document.getElementById('yapi')
|
|
)
|
|
}
|
|
|