You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
642 B
24 lines
642 B
import { Suspense } from "react";
|
|
import { Route, Routes } from "react-router-dom";
|
|
import routes from "./routes";
|
|
|
|
const RenderRouter = () => {
|
|
return (
|
|
<Suspense fallback={<div className='row-center' style={{ height: '80vh' }}>
|
|
<div className='tac'>
|
|
{/* <Loading color='#1BEDFF' size={30} /> */}
|
|
<div className='fz-16 sub-text mt-1'>加载中...</div>
|
|
</div>
|
|
</div>}>
|
|
<Routes>
|
|
{routes.map(item => {
|
|
return (
|
|
<Route path={item.path} element={item.element} key={item.path} />
|
|
)
|
|
})}
|
|
</Routes>
|
|
</Suspense>
|
|
)
|
|
}
|
|
|
|
export default RenderRouter;
|