mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 13:39:24 +08:00
fix: fix compatibility issues
This commit is contained in:
parent
4fe9a10632
commit
4271cea8f8
@ -450,7 +450,7 @@ const MobileActions: FC = (props) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const actionsRender = (props) => {
|
const actionsRender: any = (props) => {
|
||||||
if (props.isMobile) {
|
if (props.isMobile) {
|
||||||
return <MobileActions />;
|
return <MobileActions />;
|
||||||
}
|
}
|
||||||
@ -658,9 +658,10 @@ const LegacyRouteCompat: FC = (props) => {
|
|||||||
const currentPageUid = useCurrentPageUid();
|
const currentPageUid = useCurrentPageUid();
|
||||||
const { allAccessRoutes } = useAllAccessDesktopRoutes();
|
const { allAccessRoutes } = useAllAccessDesktopRoutes();
|
||||||
const route = findRouteByMenuSchemaUid(currentPageUid, allAccessRoutes);
|
const route = findRouteByMenuSchemaUid(currentPageUid, allAccessRoutes);
|
||||||
|
const location = useLocationNoUpdate();
|
||||||
|
|
||||||
if (route) {
|
if (route) {
|
||||||
return <Navigate to={`/admin/${route.schemaUid}`} />;
|
return <Navigate to={location.pathname.replace(currentPageUid, route.schemaUid)} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
return <>{props.children}</>;
|
return <>{props.children}</>;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user