File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
components/oauth/oauth-sso-handler-dialog Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,10 @@ import { appFeatureFlagsFeaturesSelector } from 'uiSrc/slices/app/features'
8
8
import { setSignInDialogState } from 'uiSrc/slices/oauth/cloud'
9
9
10
10
export interface Props {
11
- children : ( ssoCloudHandlerClick : ( e : React . MouseEvent , source : OAuthSocialSource ) => void ) => React . ReactElement
11
+ children : (
12
+ ssoCloudHandlerClick : ( e : React . MouseEvent , source : OAuthSocialSource ) => void ,
13
+ isSSOEnabled : boolean ,
14
+ ) => React . ReactElement
12
15
}
13
16
14
17
const OAuthSsoHandlerDialog = ( { children } : Props ) => {
@@ -32,7 +35,7 @@ const OAuthSsoHandlerDialog = ({ children }: Props) => {
32
35
} )
33
36
}
34
37
35
- return children ?.( ssoCloudHandlerClick )
38
+ return children ?.( ssoCloudHandlerClick , ! ! feature ?. flag )
36
39
}
37
40
38
41
export default OAuthSsoHandlerDialog
Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ const HomeHeader = ({ onAddInstance, direction }: Props) => {
185
185
const linkStyles = stylesCss ? stylesCss [ theme ] : { }
186
186
const promoLink = (
187
187
< OAuthSsoHandlerDialog >
188
- { ( ssoCloudHandlerClick ) => (
188
+ { ( ssoCloudHandlerClick , isSSOEnabled ) => (
189
189
< PromoLink
190
190
title = { title }
191
191
description = { description }
@@ -199,7 +199,10 @@ const HomeHeader = ({ onAddInstance, direction }: Props) => {
199
199
: undefined
200
200
} }
201
201
onClick = { ( e ) => {
202
- handleCreateDatabaseClick ( HELP_LINKS . cloud . event , { source : 'My Redis databases' } )
202
+ ! isSSOEnabled && handleCreateDatabaseClick (
203
+ HELP_LINKS . cloud . event ,
204
+ { source : HELP_LINKS . cloud . sources . databaseList } ,
205
+ )
203
206
ssoCloudHandlerClick ( e , OAuthSocialSource . ListOfDatabases )
204
207
} }
205
208
/>
You can’t perform that action at this time.
0 commit comments