fix(RouterContainer): remove unnecessary empty-dep useMemo
getEntryPointType() is a simple config getter. Replace useMemo(() => ..., []) with a direct call — the empty dep array made the memo pointless. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -14,9 +14,7 @@ export default function RouterContainer() {
|
|||||||
return currentPage === 'dashboard' ? 'page-transition-dashboard' : 'page-transition-enter';
|
return currentPage === 'dashboard' ? 'page-transition-dashboard' : 'page-transition-enter';
|
||||||
}, [currentPage]);
|
}, [currentPage]);
|
||||||
|
|
||||||
const entryPointType = useMemo(() => {
|
const entryPointType = getEntryPointType();
|
||||||
return getEntryPointType();
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
// 骨架屏加载状态守卫
|
// 骨架屏加载状态守卫
|
||||||
if (!isLoaded) {
|
if (!isLoaded) {
|
||||||
|
|||||||
Reference in New Issue
Block a user