forked from huge/frontEnd/hugeDyh2.0

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
 * @Company: hugeInfo
 * @Author: ldh
 * @Date: 2022-02-14 15:48:51
 * @LastEditTime: 2022-02-17 15:17:04
 * @LastEditors: ldh
 * @Version: 1.0.0
 * @Description: 路由
 */
import React from 'react';
import { HashRouter as Router, Route, Routes, Navigate } from 'react-router-dom';
import Navigation from '../components/Navigation';
 
import Login from '../views/login';
import Customer from '../views/customer';
 
const Routers = () => {
    return (
        <Router>
            <Routes>
                <Route path="/login" exact element={<Login />} />
                <Route path="/operation" element={<Navigation />}>
                    <Route path="customer" element={<Customer />} />
                </Route>
                <Route path="*" element={<Navigate to="/operation/customer" />} />
            </Routes>
        </Router>
    );
};
 
export default Routers;