import React from 'react' ; import { Route } from 'dva/router' ; import Basic from './component/basic' ; import MySite from './component/mySites' ; import Setting from './component/setting' ; import styles from './styles.less' ; import MyFavorite from './component/myFavorite' ; export default ( props ) => { const { history : { location : { pathname } , } , } = props ; return ( < div className = { styles . slide } key = { pathname } > < Route path = "/user/basic-info" component = { ( ) => ( < Basic { ... props } / > ) } /> < Route path = "/user/my-site" component = { ( ) => ( < MySite { ... props } / > ) } /> < Route path = "/user/setting" component = { ( ) => ( < Setting { ... props } / > ) } /> < Route path = "/user/my-favorite" component = { ( ) => ( < MyFavorite { ... props } / > ) } /> < /div>); } ;