9
9
EuiToolTip ,
10
10
} from '@elastic/eui'
11
11
import { isEmpty } from 'lodash'
12
- import { useDispatch , useSelector } from 'react-redux'
12
+ import { useSelector } from 'react-redux'
13
13
import cx from 'classnames'
14
14
import { FeatureFlagComponent , ImportDatabasesDialog , OAuthSsoHandlerDialog } from 'uiSrc/components'
15
15
import { sendEventTelemetry , TelemetryEvent } from 'uiSrc/telemetry'
@@ -25,10 +25,7 @@ import { OAuthSocialSource } from 'uiSrc/slices/interfaces'
25
25
import { FeatureFlags } from 'uiSrc/constants'
26
26
import { ReactComponent as ConfettiIcon } from 'uiSrc/assets/img/oauth/confetti.svg'
27
27
import { getContentByFeature } from 'uiSrc/utils/content'
28
- import HighlightedFeature from 'uiSrc/components/hightlighted-feature/HighlightedFeature'
29
- import { appFeatureFlagsFeaturesSelector , appFeatureHighlightingSelector , removeFeatureFromHighlighting } from 'uiSrc/slices/app/features'
30
- import { getHighlightingFeatures } from 'uiSrc/utils/highlighting'
31
- import { BUILD_FEATURES } from 'uiSrc/constants/featuresHighlighting'
28
+ import { appFeatureFlagsFeaturesSelector } from 'uiSrc/slices/app/features'
32
29
import SearchDatabasesList from '../SearchDatabasesList'
33
30
34
31
import styles from './styles.module.scss'
@@ -46,15 +43,11 @@ const HomeHeader = ({ onAddInstance, direction }: Props) => {
46
43
const { data : instances } = useSelector ( instancesSelector )
47
44
const featureFlags = useSelector ( appFeatureFlagsFeaturesSelector )
48
45
const { loading, data } = useSelector ( contentSelector )
49
- const { features } = useSelector ( appFeatureHighlightingSelector )
50
- const { cloudButton : cloudButtonHighlighting } = getHighlightingFeatures ( features )
51
46
52
47
const [ promoData , setPromoData ] = useState < ContentCreateRedis > ( )
53
48
const [ guides , setGuides ] = useState < IHelpGuide [ ] > ( [ ] )
54
49
const [ isImportDialogOpen , setIsImportDialogOpen ] = useState < boolean > ( false )
55
50
56
- const dispatch = useDispatch ( )
57
-
58
51
useEffect ( ( ) => {
59
52
if ( loading || ! data || isEmpty ( data ) ) {
60
53
return
@@ -183,7 +176,7 @@ const HomeHeader = ({ onAddInstance, direction }: Props) => {
183
176
const { title, description, styles : stylesCss , links } = content
184
177
// @ts -ignore
185
178
const linkStyles = stylesCss ? stylesCss [ theme ] : { }
186
- const promoLink = (
179
+ return (
187
180
< OAuthSsoHandlerDialog >
188
181
{ ( ssoCloudHandlerClick , isSSOEnabled ) => (
189
182
< PromoLink
@@ -209,32 +202,6 @@ const HomeHeader = ({ onAddInstance, direction }: Props) => {
209
202
) }
210
203
</ OAuthSsoHandlerDialog >
211
204
)
212
- return (
213
- < FeatureFlagComponent name = { FeatureFlags . cloudSso } otherwise = { promoLink } >
214
- < HighlightedFeature
215
- isHighlight = { cloudButtonHighlighting }
216
- type = { BUILD_FEATURES ?. cloudButton ?. type }
217
- onClick = { ( ) => dispatch ( removeFeatureFromHighlighting ( 'cloudButton' ) ) }
218
- >
219
- < EuiToolTip
220
- position = "bottom"
221
- anchorClassName = { styles . cloudSsoPromoBtnAnchor }
222
- content = { (
223
- < div className = { styles . cloudSsoPromoTooltip } >
224
- < EuiIcon type = { ConfettiIcon } className = { styles . cloudSsoPromoTooltipIcon } />
225
- < div >
226
- New!
227
- < br />
228
- Now you can create a free Redis Stack database in Redis Enterprise Cloud in a few clicks.
229
- </ div >
230
- </ div >
231
- ) }
232
- >
233
- { promoLink }
234
- </ EuiToolTip >
235
- </ HighlightedFeature >
236
- </ FeatureFlagComponent >
237
- )
238
205
}
239
206
240
207
return (
0 commit comments