FinancialReimbursementSyste.../src/router/router.tsx

25 lines
934 B
TypeScript
Raw Normal View History

2022-12-27 21:33:49 +08:00
import {Routes, Route} from "react-router-dom";
import {createBrowserHistory} from "history";
2022-12-26 17:44:46 +08:00
import LoginView from "../pages/login/LoginView";
2022-12-23 23:00:44 +08:00
import HomeView from "../pages/HomeView";
2022-12-26 17:44:46 +08:00
import InvoiceListView from "../pages/Invoice/mine/InvoiceListView";
import MyReimbursement from "../pages/reimbursement/mine/MyReimbursement";
2022-12-27 21:33:49 +08:00
import {BrowserRouter} from "./BrowserRouter"
2022-12-23 23:00:44 +08:00
2022-12-27 21:33:49 +08:00
export const history = createBrowserHistory()
2022-12-24 11:50:11 +08:00
2022-12-27 21:33:49 +08:00
function CustomRouter() {
return (
<BrowserRouter history={history}>
<Routes>
<Route path="/" element={<HomeView/>}>
<Route path="invoice/mine" element={<InvoiceListView/>}></Route>
<Route path="reimbursement/mine" element={<MyReimbursement/>}></Route>
</Route>
<Route path="/login" element={<LoginView/>}></Route>
</Routes>
</BrowserRouter>
)
}
export default CustomRouter