import 'antd/dist/antd.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'))

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

  )
}
