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

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

import Auth from './models/user';
import Customer from './models/customer';

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