refactor: more lazy load router

This commit is contained in:
Tristan Yang
2022-11-25 21:59:41 +08:00
parent 858650924a
commit 55f26a6077
+13
View File
@@ -0,0 +1,13 @@
import { PropsWithChildren, Suspense } from 'react';
import Loading from "../common/component/Loading";
type Props = {}
const Lazy = ({ children }: PropsWithChildren<Props>) => {
return (
<Suspense fallback={<Loading />}>
{children}
</Suspense>
);
};
export default Lazy;