File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -17,16 +17,18 @@ export default function CloudLibrary( props ) {
17
17
} = props ;
18
18
19
19
const storeData = useSelect ( select => {
20
- const { isLoading } = select ( 'optimole' ) ;
20
+ const { isLoading, isSubApiKey } = select ( 'optimole' ) ;
21
21
return {
22
- isLoading : isLoading ( )
22
+ isLoading : isLoading ( ) ,
23
+ isSubApiKey : isSubApiKey ( )
23
24
} ;
24
25
} , [ ] ) ;
25
26
26
- const { isLoading } = storeData ;
27
+ const { isLoading, isSubApiKey } = storeData ;
27
28
28
29
29
30
const isCloudLibraryEnabled = 'disabled' !== settings [ 'cloud_images' ] ;
31
+ const showSiteSelector = ! isSubApiKey && isCloudLibraryEnabled ;
30
32
const whitelistedDomains = user_data . whitelist || [ ] ;
31
33
32
34
@@ -81,7 +83,7 @@ export default function CloudLibrary( props ) {
81
83
82
84
< hr className = "my-8 border-grayish-blue" />
83
85
84
- { isCloudLibraryEnabled && (
86
+ { showSiteSelector && (
85
87
< BaseControl
86
88
label = { options_strings . cloud_site_title }
87
89
help = { options_strings . cloud_site_desc }
Original file line number Diff line number Diff line change @@ -93,6 +93,9 @@ const selectors = {
93
93
}
94
94
95
95
return state . logs ;
96
+ } ,
97
+ isSubApiKey ( state ) {
98
+ return state . apiKey && state . apiKey . startsWith ( 'optml-s' ) ;
96
99
}
97
100
} ;
98
101
You can’t perform that action at this time.
0 commit comments