// 引入两个组件
import Login from "./Login";
import Layout from "./Layout";
import Board from "./Board";
import Article from "./Article";

import { BrowserRouter, Routes, Route} from "react-router-dom"

// 进行路由配置
function App() {
  return (

    <BrowserRouter>

    <Routes>

      <Route path="/" element={<Layout/>}>
        {/* 定义二级路由嵌套 */}
        {/* 进入页面指定显示：默认二级，添加 index 属性，将自己的 path 干掉 */}
        <Route index element={<Board/>}></Route>
        <Route path="Article" element={<Article/>}></Route>
      </Route>

      <Route path="login" element={<Login/>}></Route>
    </Routes>
    </BrowserRouter>
  );
}

export default App;
