34 lines
1.6 KiB
TypeScript
34 lines
1.6 KiB
TypeScript
import {Routes, Route} from "react-router-dom";
|
|
import {createBrowserHistory} from "history";
|
|
import LoginView from "../pages/login/LoginView";
|
|
import HomeView from "../pages/HomeView";
|
|
import InvoiceListView from "../pages/Invoice/InvoiceListView";
|
|
import MyReimbursement from "../pages/reimbursement/mine/MyReimbursement";
|
|
import {BrowserRouter} from "./BrowserRouter"
|
|
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";
|
|
import MyInvoice from "../pages/Invoice/mine/MyInvoice";
|
|
|
|
export const history = createBrowserHistory()
|
|
|
|
function CustomRouter() {
|
|
return (
|
|
<BrowserRouter history={history}>
|
|
<Routes>
|
|
<Route path="/" element={<HomeView/>}>
|
|
<Route path="invoice/mine" element={<MyInvoice/>}></Route>
|
|
<Route path="reimbursement/mine" element={<MyReimbursement/>}></Route>
|
|
<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>
|
|
</Route>
|
|
<Route path="/login" element={<LoginView/>}></Route>
|
|
</Routes>
|
|
</BrowserRouter>
|
|
)
|
|
}
|
|
|
|
export default CustomRouter |