diff --git a/packages/core/client/src/route-switch/antd/admin-layout/index.tsx b/packages/core/client/src/route-switch/antd/admin-layout/index.tsx
index 4640dc0a51..28f14910d2 100644
--- a/packages/core/client/src/route-switch/antd/admin-layout/index.tsx
+++ b/packages/core/client/src/route-switch/antd/admin-layout/index.tsx
@@ -450,7 +450,7 @@ const MobileActions: FC = (props) => {
);
};
-const actionsRender = (props) => {
+const actionsRender: any = (props) => {
if (props.isMobile) {
return ;
}
@@ -658,9 +658,10 @@ const LegacyRouteCompat: FC = (props) => {
const currentPageUid = useCurrentPageUid();
const { allAccessRoutes } = useAllAccessDesktopRoutes();
const route = findRouteByMenuSchemaUid(currentPageUid, allAccessRoutes);
+ const location = useLocationNoUpdate();
if (route) {
- return ;
+ return ;
}
return <>{props.children}>;