From 55f26a60772c327760775945aaf62d508be7286f Mon Sep 17 00:00:00 2001 From: Tristan Yang Date: Fri, 25 Nov 2022 21:59:41 +0800 Subject: [PATCH] refactor: more lazy load router --- src/routes/lazy.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/routes/lazy.tsx diff --git a/src/routes/lazy.tsx b/src/routes/lazy.tsx new file mode 100644 index 00000000..c061a924 --- /dev/null +++ b/src/routes/lazy.tsx @@ -0,0 +1,13 @@ +import { PropsWithChildren, Suspense } from 'react'; +import Loading from "../common/component/Loading"; +type Props = {} + +const Lazy = ({ children }: PropsWithChildren) => { + return ( + }> + {children} + + ); +}; + +export default Lazy; \ No newline at end of file