import React from 'react';
import dva from './utils/dva';

import Router, {routerReducer, routerMiddleware} from './router';

import Auth from './models/user';

const app = dva({
  initialState: {},
  models: [Auth, ],
  extraReducers: {router: routerReducer},
  onAction: [routerMiddleware],
  onError(e) {
    console.log('onError', e);
  },
});
const App = app.start(<Router />);
export default App;
