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

34 lines
1.6 KiB
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";
2023-01-05 16:24:02 +08:00
import InvoiceListView from "../pages/Invoice/InvoiceListView";
2022-12-26 17:44:46 +08:00
import MyReimbursement from "../pages/reimbursement/mine/MyReimbursement";
2022-12-27 21:33:49 +08:00
import {BrowserRouter} from "./BrowserRouter"
2022-12-29 15:20:09 +08:00
import InvoiceManagement from "../pages/Invoice/management/InvoiceManagement";
import ReimbursementApproval from "../pages/reimbursement/approval/ReimbursementApproval";
import StatView from "../pages/stat/StatView";
import Configuration from "../pages/configuration/Configuration";
2023-01-05 16:24:02 +08:00
import MyInvoice from "../pages/Invoice/mine/MyInvoice";
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/>}>
2023-01-05 16:24:02 +08:00
<Route path="invoice/mine" element={<MyInvoice/>}></Route>
2022-12-27 21:33:49 +08:00
<Route path="reimbursement/mine" element={<MyReimbursement/>}></Route>
2022-12-29 15:20:09 +08:00
<Route path="invoice/management" element={<InvoiceManagement/>}></Route>
<Route path="reimbursement/approval" element={<ReimbursementApproval/>}></Route>
<Route path="stat" element={<StatView/>}></Route>
<Route path="config" element={<Configuration/>}></Route>
2022-12-27 21:33:49 +08:00
</Route>
<Route path="/login" element={<LoginView/>}></Route>
</Routes>
</BrowserRouter>
)
}
export default CustomRouter