diff --git a/packages/core/client/src/schema-component/antd/page/Page.tsx b/packages/core/client/src/schema-component/antd/page/Page.tsx index 89bc6bf4d1..ba156b9d36 100644 --- a/packages/core/client/src/schema-component/antd/page/Page.tsx +++ b/packages/core/client/src/schema-component/antd/page/Page.tsx @@ -31,17 +31,14 @@ import { useGetAriaLabelOfSchemaInitializer } from '../../../schema-initializer/ import { DndContext } from '../../common'; import { SortableItem } from '../../common/sortable-item'; import { SchemaComponent, SchemaComponentOptions } from '../../core'; -import { useCompile, useDesignable } from '../../hooks'; +import { useDesignable } from '../../hooks'; import { useToken } from '../__builtins__'; import { ErrorFallback } from '../error-fallback'; import { useStyles } from './Page.style'; import { PageDesigner, PageTabDesigner } from './PageTabDesigner'; export const Page = (props) => { - const { children, ...others } = props; const { t } = useTranslation(); - const compile = useCompile(); - const { title, setTitle } = useDocumentTitle(); const fieldSchema = useFieldSchema(); const dn = useDesignable(); const { theme } = useGlobalTheme(); @@ -49,15 +46,8 @@ export const Page = (props) => { const { tabUid, name: pageUid } = useParams(); const basenameOfCurrentRouter = useRouterBasename(); - useEffect(() => { - if (!title) { - setTitle(t(fieldSchema.title)); - } - }, [fieldSchema.title, title]); - const disablePageHeader = fieldSchema['x-component-props']?.disablePageHeader; const enablePageTabs = fieldSchema['x-component-props']?.enablePageTabs; - const hidePageTitle = fieldSchema['x-component-props']?.hidePageTitle; const options = useContext(SchemaOptionsContext); const navigate = useNavigateNoUpdate(); const [searchParams] = useSearchParams(); @@ -71,20 +61,6 @@ export const Page = (props) => { const aclStyles = useAClStyles(); const { token } = useToken(); - const pageHeaderTitle = hidePageTitle ? undefined : fieldSchema.title || compile(title); - - useRequest( - { - url: `/uiSchemas:getParentJsonSchema/${fieldSchema['x-uid']}`, - }, - { - ready: !hidePageTitle && !pageHeaderTitle, - onSuccess(data) { - setTitle(data.data.title); - }, - }, - ); - const handleErrors = useCallback((error) => { console.error(error); }, []); @@ -195,17 +171,7 @@ export const Page = (props) => { return wrapSSR(