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

11 months ago
  1. import { Suspense } from "react";
  2. import { Route, Routes } from "react-router-dom";
  3. import routes from "./routes";
  4. const RenderRouter = () => {
  5. return (
  6. <Suspense fallback={<div className='row-center' style={{ height: '80vh' }}>
  7. <div className='tac'>
  8. {/* <Loading color='#1BEDFF' size={30} /> */}
  9. <div className='fz-16 sub-text mt-1'>...</div>
  10. </div>
  11. </div>}>
  12. <Routes>
  13. {routes.map(item => {
  14. return (
  15. <Route path={item.path} element={item.element} key={item.path} />
  16. )
  17. })}
  18. </Routes>
  19. </Suspense>
  20. )
  21. }
  22. export default RenderRouter;