/*
 * @Author: 闫栓柱 1686048631@qq.com
 * @Date: 2022-05-19 12:46:53
 * @LastEditors: 闫栓柱 1686048631@qq.com
 * @LastEditTime: 2022-05-19 19:10:26
 * @FilePath: \monoerpo集合\packages\apps\src\layout\index.tsx
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import React from 'react';
import { routerMenu } from '@/router/index';
import { useRoutes, HashRouter as Router, Routes, Route, Navigate } from 'react-router-dom';
function Redirect({ to }: { to: string }) {
    return (
        <Routes
        >
            <Route path="/"
                element={(<Navigate to={to} replace={true} />)}
            >
            </Route>
        </Routes>
    )
}
const RouterViews = () => {
    const Views = useRoutes(routerMenu);
    return Views;
};
function Pages() {
    return (
        <React.Fragment>
            <Router>
                <Redirect to='/home' />
                <RouterViews></RouterViews>
            </Router>
        </React.Fragment>
    );
}

export default Pages;
