import 'antd/dist/antd.min.css';
import '@/assets/styles/base.css'
// import { useDispatch, useSelector } from 'react-redux'
// import { RootState } from './store'
// import { addNunAction } from './store/action/login'

// 关于路由
import React from "react"
import { Router, Route, Switch, Redirect } from "react-router-dom"
import history from "./utils/history"
const Home = React.lazy(() => import('./pages/Home'))
const Model = React.lazy(() => import('./pages/Model'))

export default function App() {
  // const dispatch = useDispatch()
  return (
    <div className='App'>
      {/* 关于路由 */}
      <Router history={history}>
        <React.Suspense fallback={<div className='lodingApp'>加载中...</div>}>
          <Switch>
            <Redirect exact path="/" to="Home" />
            <Route path="/Model" component={Model} />
            <Route path="/Home" component={Home} />
          </Switch>
        </React.Suspense>
      </Router>
    </div>

  )
}
