+
{renderTitle(width, MODULE_TEXT_VIEW[moduleName])}
{CONTENT[moduleName]?.text.map((item: string) => (
@@ -133,57 +144,19 @@ const ModuleNotLoaded = ({ moduleName, id, type = 'workbench', onClose }: IProps
{renderText(MODULE_TEXT_VIEW[moduleName])}
-
- {!!freeDbWithModule && (
+
+ {freeDbWithModule ? (
- )}
- {!freeDbWithModule && (
-
- <>
-
- Learn More
-
-
- {(ssoCloudHandlerClick) => (
- {
- ssoCloudHandlerClick(
- e,
- {
- source: type === 'browser' ? OAuthSocialSource.BrowserSearch : OAuthSocialSource[module],
- action: OAuthSocialAction.Create
- }
- )
- onFreeDatabaseClick()
- }}
- data-testid="get-started-link"
- >
-
- Get Started For Free
-
-
- )}
-
- >
-
+ ) : (
+
)}
diff --git a/redisinsight/ui/src/components/messages/module-not-loaded/ModuleNotLoadedButton.tsx b/redisinsight/ui/src/components/messages/module-not-loaded/ModuleNotLoadedButton.tsx
new file mode 100644
index 0000000000..96bde6a3c3
--- /dev/null
+++ b/redisinsight/ui/src/components/messages/module-not-loaded/ModuleNotLoadedButton.tsx
@@ -0,0 +1,124 @@
+import React from 'react'
+import { useSelector } from 'react-redux'
+import cx from 'classnames'
+import {
+ EuiButton,
+ EuiLink,
+} from '@elastic/eui'
+import { useHistory } from 'react-router-dom'
+import {
+ FeatureFlags,
+ MODULE_NOT_LOADED_CONTENT as CONTENT,
+ Pages,
+} from 'uiSrc/constants'
+import { appFeatureFlagsFeaturesSelector } from 'uiSrc/slices/app/features'
+import styles from 'uiSrc/components/messages/module-not-loaded/styles.module.scss'
+import { FeatureFlagComponent, OAuthSsoHandlerDialog } from 'uiSrc/components'
+import { getUtmExternalLink } from 'uiSrc/utils/links'
+import { EXTERNAL_LINKS, UTM_CAMPAINGS } from 'uiSrc/constants/links'
+import {
+ OAuthSocialAction,
+ OAuthSocialSource,
+ RedisDefaultModules,
+} from 'uiSrc/slices/interfaces'
+
+export interface IProps {
+ moduleName: RedisDefaultModules
+ module?: String;
+ onClose?: () => void
+ type?: 'workbench' | 'browser'
+}
+
+const ModuleNotLoadedButton = ({ moduleName, type, onClose, module }: IProps) => {
+ const history = useHistory()
+ const {
+ [FeatureFlags.envDependent]: envDependentFeature,
+ } = useSelector(appFeatureFlagsFeaturesSelector)
+
+ const utmCampaign =
+ type === 'browser'
+ ? UTM_CAMPAINGS[OAuthSocialSource.BrowserSearch]
+ : UTM_CAMPAINGS[OAuthSocialSource.Workbench]
+
+ if (!envDependentFeature?.flag) {
+ return null
+ }
+
+ return (
+ <>
+