From b819a90c804c97c0b0006b167aa328705e4d17ba Mon Sep 17 00:00:00 2001 From: rahulkeswani101 Date: Tue, 6 Aug 2024 19:18:48 +0530 Subject: [PATCH] feat: added links to integrations page in onboarding section (#5606) * feat: added links to integrations page in onboarding section * feat: removed box shadow for button * refactor: added routes object to navigate to integrations page * feat: added new styles for data source name --- .../Steps/DataSource/DataSource.styles.scss | 34 +++++++++++++++++++ .../Steps/DataSource/DataSource.tsx | 25 ++++++++++++-- 2 files changed, 57 insertions(+), 2 deletions(-) diff --git a/frontend/src/container/OnboardingContainer/Steps/DataSource/DataSource.styles.scss b/frontend/src/container/OnboardingContainer/Steps/DataSource/DataSource.styles.scss index a3d8468559..2bbd18bab2 100644 --- a/frontend/src/container/OnboardingContainer/Steps/DataSource/DataSource.styles.scss +++ b/frontend/src/container/OnboardingContainer/Steps/DataSource/DataSource.styles.scss @@ -41,3 +41,37 @@ div[class*='-setup-instructions-container'] { .service-name-container { width: 100%; } + +.intgeration-page-container { + background-color: var(--bg-ink-400); + border-color: var(--bg-slate-500); +} + +.intgeration-page-container-text { + color: var(--bg-vanilla-400); +} + +.navigate-integrations-page-btn { + display: flex; + align-items: center; + color: var(--bg-vanilla-100); + background-color: var(--bg-slate-300); + box-shadow: none; + border: none; +} + +.dataSourceName { + color: var(--bg-vanilla-100); + font-weight: 600; + cursor: pointer; + + display: flex; + align-items: center; + gap: 8px; +} + +.lightMode { + .dataSourceName { + color: var(--bg-slate-500); + } +} \ No newline at end of file diff --git a/frontend/src/container/OnboardingContainer/Steps/DataSource/DataSource.tsx b/frontend/src/container/OnboardingContainer/Steps/DataSource/DataSource.tsx index 5a06cdef94..138aac775c 100644 --- a/frontend/src/container/OnboardingContainer/Steps/DataSource/DataSource.tsx +++ b/frontend/src/container/OnboardingContainer/Steps/DataSource/DataSource.tsx @@ -6,6 +6,7 @@ import { LoadingOutlined } from '@ant-design/icons'; import { Button, Card, Form, Input, Select, Space, Typography } from 'antd'; import logEvent from 'api/common/logEvent'; import cx from 'classnames'; +import ROUTES from 'constants/routes'; import { useOnboardingContext } from 'container/OnboardingContainer/context/OnboardingContext'; import { useCases } from 'container/OnboardingContainer/OnboardingContainer'; import { @@ -14,9 +15,10 @@ import { hasFrameworks, } from 'container/OnboardingContainer/utils/dataSourceUtils'; import { useNotifications } from 'hooks/useNotifications'; -import { Check } from 'lucide-react'; +import { Blocks, Check } from 'lucide-react'; import { useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; +import { useHistory } from 'react-router-dom'; import { popupContainer } from 'utils/selectPopupContainer'; export interface DataSourceType { @@ -29,6 +31,7 @@ export interface DataSourceType { export default function DataSource(): JSX.Element { const [form] = Form.useForm(); const { t } = useTranslation(['common']); + const history = useHistory(); const { serviceName, @@ -127,6 +130,10 @@ export default function DataSource(): JSX.Element { } }; + const goToIntegrationsPage = (): void => { + history.push(ROUTES.INTEGRATIONS); + }; + return (
@@ -156,7 +163,7 @@ export default function DataSource(): JSX.Element {
- + {dataSource.name}
@@ -214,6 +221,20 @@ export default function DataSource(): JSX.Element { )} +
+ + Not able to find datasources you are looking for, check our Integrations + page which allows more sources of sending data + + +
+
Cannot find what you’re looking for? Request a data source