mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 06:55:50 +00:00
fix(l10n): i18n namespace of page title (#4557)
This commit is contained in:
parent
ec15f9e35a
commit
af1325f055
@ -11,7 +11,7 @@ import { css } from '@emotion/css';
|
||||
import { useSessionStorageState } from 'ahooks';
|
||||
import { App, ConfigProvider, Divider, Layout } from 'antd';
|
||||
import { createGlobalStyle } from 'antd-style';
|
||||
import React, { createContext, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import React, { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { Link, Outlet, useLocation, useMatch, useNavigate, useParams } from 'react-router-dom';
|
||||
import {
|
||||
ACLRolesCheckProvider,
|
||||
@ -37,6 +37,7 @@ import { Plugin } from '../../../application/Plugin';
|
||||
import { useAppSpin } from '../../../application/hooks/useAppSpin';
|
||||
import { Help } from '../../../user/Help';
|
||||
import { VariablesProvider } from '../../../variables';
|
||||
import { useMenuTranslation } from '../../../schema-component/antd/menu/locale';
|
||||
|
||||
const filterByACL = (schema, options) => {
|
||||
const { allowAll, allowMenuItemIds = [] } = options;
|
||||
@ -76,7 +77,9 @@ const useMenuProps = () => {
|
||||
const MenuEditor = (props) => {
|
||||
const { notification } = App.useApp();
|
||||
const [hasNotice, setHasNotice] = useSessionStorageState('plugin-notice', { defaultValue: false });
|
||||
const { setTitle } = useDocumentTitle();
|
||||
const { t } = useMenuTranslation();
|
||||
const { setTitle: _setTitle } = useDocumentTitle();
|
||||
const setTitle = useCallback((title) => _setTitle(t(title)), []);
|
||||
const navigate = useNavigate();
|
||||
const params = useParams<any>();
|
||||
const location = useLocation();
|
||||
|
Loading…
Reference in New Issue
Block a user