File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed
config-ui/src/plugins/components/scope-config Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import styled from 'styled-components';
2424import API from '@/api' ;
2525import { IconButton , Message } from '@/components' ;
2626import { PATHS } from '@/config' ;
27+ import { getPluginConfig } from '@/plugins' ;
2728import { operator } from '@/utils' ;
2829
2930import { PluginName } from '../plugin-name' ;
@@ -59,6 +60,8 @@ export const ScopeConfig = ({
5960
6061 const [ operating , setOperating ] = useState ( false ) ;
6162
63+ const pluginConfig = getPluginConfig ( plugin ) ;
64+
6265 const {
6366 token : { colorPrimary } ,
6467 } = theme . useToken ( ) ;
@@ -197,15 +200,17 @@ export const ScopeConfig = ({
197200 < Wrapper >
198201 { contextHolder }
199202 < span > { scopeConfigId ? scopeConfigName : 'N/A' } </ span >
200- < IconButton
201- icon = { < LinkOutlined /> }
202- helptip = "Associate Scope Config"
203- size = "small"
204- type = "link"
205- onClick = { ( ) => {
206- setType ( 'associate' ) ;
207- } }
208- />
203+ { pluginConfig . scopeConfig && (
204+ < IconButton
205+ icon = { < LinkOutlined /> }
206+ helptip = "Associate Scope Config"
207+ size = "small"
208+ type = "link"
209+ onClick = { ( ) => {
210+ setType ( 'associate' ) ;
211+ } }
212+ />
213+ ) }
209214 { scopeConfigId && (
210215 < IconButton
211216 icon = { < EditOutlined /> }
You can’t perform that action at this time.
0 commit comments