@giteeteam/apps-team-components 1.10.1 → 1.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,6 +4,7 @@ import { ClassNames } from '@emotion/react';
|
|
|
4
4
|
import { useCreation } from 'ahooks';
|
|
5
5
|
import { getArrayValue } from '../../../lib/array.js';
|
|
6
6
|
import useI18n from '../../../lib/hooks/useI18n.js';
|
|
7
|
+
import useTeamConfig from '../../../lib/hooks/useTeamConfig.js';
|
|
7
8
|
import { isInCMCC } from '../../../lib/isInCMCC.js';
|
|
8
9
|
import EmptyField from '../../common/EmptyField.js';
|
|
9
10
|
import { tooltipOverflowStyle, getTooltipMaxlineStyle } from '../../common/overflow-tooltip/style/index.js';
|
|
@@ -11,13 +12,14 @@ import { useToWorkspacePage } from './hooks.js';
|
|
|
11
12
|
import { pointerStyle } from './style/index.js';
|
|
12
13
|
import ValueDisplay from './ValueDisplay.js';
|
|
13
14
|
|
|
14
|
-
const inCMCC = isInCMCC();
|
|
15
15
|
const BindWorkspaceReadView = memo(props => {
|
|
16
16
|
const { value: _value, mode } = props;
|
|
17
17
|
const { t } = useI18n();
|
|
18
|
+
const { publicRuntimeConfig } = useTeamConfig();
|
|
19
|
+
const inCMCC = isInCMCC(publicRuntimeConfig);
|
|
18
20
|
const { toWorkspacePage } = useToWorkspacePage();
|
|
19
21
|
const value = useCreation(() => getArrayValue(_value), [_value]);
|
|
20
|
-
const title = useCreation(() => (inCMCC ? '' : t('pages.fields.default.toWorkspacePage')), [t]);
|
|
22
|
+
const title = useCreation(() => (inCMCC ? '' : t('pages.fields.default.toWorkspacePage')), [t, inCMCC]);
|
|
21
23
|
return (jsx(ClassNames, { children: ({ cx, css }) => {
|
|
22
24
|
if (!(value === null || value === void 0 ? void 0 : value.length))
|
|
23
25
|
return jsx(EmptyField, { readonly: true });
|