fix: the data range set on the mobile page based on URL parameters is invalid (#5968)

* fix: mobilePageVariableContextConsumptionDelay

* refactor: extract components and remove redundant code

* fix: make CI pass

---------

Co-authored-by: Zeke Zhang <958414905@qq.com>
This commit is contained in:
chenyongxin 2025-01-03 12:21:27 +08:00 committed by GitHub
parent 72255250fa
commit d6c68c1bd9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View File

@ -19,6 +19,7 @@ import {
RouteObject,
useRoutes,
} from 'react-router-dom';
import VariablesProvider from '../variables/VariablesProvider';
import { Application } from './Application';
import { CustomRouterContextProvider } from './CustomRouterContextProvider';
import { BlankComponent, RouterContextCleaner } from './components';
@ -146,8 +147,10 @@ export class RouterManager {
<ReactRouter {...opts}>
<CustomRouterContextProvider>
<BaseLayout>
<RenderRoutes />
{children}
<VariablesProvider>
<RenderRoutes />
{children}
</VariablesProvider>
</BaseLayout>
</CustomRouterContextProvider>
</ReactRouter>

View File

@ -38,7 +38,6 @@ import { Plugin } from '../../../application/Plugin';
import { useAppSpin } from '../../../application/hooks/useAppSpin';
import { useMenuTranslation } from '../../../schema-component/antd/menu/locale';
import { Help } from '../../../user/Help';
import { VariablesProvider } from '../../../variables';
const filterByACL = (schema, options) => {
const { allowAll, allowMenuItemIds = [] } = options;
@ -508,9 +507,7 @@ export const AdminProvider = (props) => {
<NavigateIfNotSignIn>
<RemoteSchemaTemplateManagerProvider>
<RemoteCollectionManagerProvider>
<VariablesProvider>
<ACLRolesCheckProvider>{props.children}</ACLRolesCheckProvider>
</VariablesProvider>
<ACLRolesCheckProvider>{props.children}</ACLRolesCheckProvider>
</RemoteCollectionManagerProvider>
</RemoteSchemaTemplateManagerProvider>
</NavigateIfNotSignIn>