Commit 79a496e5 authored by Chunchi Che's avatar Chunchi Che

optimize small

parent 984ba7ff
Pipeline #22814 passed with stages
in 14 minutes and 8 seconds
import React, { Suspense } from "react";
// 这个组件不知道为啥用不了,先保留后面研究下
// TODO: 这个组件不知道为啥某些路由用不了,后面研究下
const LazyLoad = (props: { lazy: React.ReactNode }) => {
return <Suspense fallback={<div>Loading...</div>}>{props.lazy}</Suspense>;
};
......
......@@ -32,14 +32,7 @@ export default function () {
</Suspense>
}
/>
<Route
path="/replay"
element={
<Suspense fallback={<Loading />}>
<Replay />
</Suspense>
}
/>
<Route path="/replay" element={<LazyLoad lazy={<Replay />} />} />
<Route
path="/duel/:player/:passWd/:ip"
element={
......@@ -48,14 +41,7 @@ export default function () {
</Suspense>
}
/>
<Route
path="/sso/*"
element={
<Suspense fallback={<Loading />}>
<SSO />
</Suspense>
}
/>
<Route path="/sso/*" element={<LazyLoad lazy={<SSO />} />} />
</Routes>
);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment