Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc: remove feature flag on salesforce integration display #1969

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 24 additions & 28 deletions src/pages/settings/Integrations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ import {
TAX_MANAGEMENT_INTEGRATION_ROUTE,
XERO_INTEGRATION_ROUTE,
} from '~/core/router'
import { FeatureFlags, isFeatureFlagActive } from '~/core/utils/featureFlags'
import { PremiumIntegrationTypeEnum, useIntegrationsSettingQuery } from '~/generated/graphql'
import { useInternationalization } from '~/hooks/core/useInternationalization'
import { useCurrentUser } from '~/hooks/useCurrentUser'
Expand Down Expand Up @@ -132,7 +131,6 @@ const Integrations = () => {
const navigate = useNavigate()
const { isPremium } = useCurrentUser()
const { organization: { premiumIntegrations } = {} } = useOrganizationInfos()
const isFeatureSalesforceEnabled = isFeatureFlagActive(FeatureFlags.FTR_SALESFORCE_ENABLED)

const premiumWarningDialogRef = useRef<PremiumWarningDialogRef>(null)
const addAnrokDialogRef = useRef<AddAnrokDialogRef>(null)
Expand Down Expand Up @@ -408,33 +406,31 @@ const Integrations = () => {
}
}}
/>
{isFeatureSalesforceEnabled && (
<Selector
fullWidth
title={translate('text_1731507195246vu9kt6xnhv6')}
subtitle={translate('text_1731507195246zr2p61vihmw')}
icon={
<Avatar size="big" variant="connector-full">
{<Salesforce />}
</Avatar>
<Selector
fullWidth
title={translate('text_1731507195246vu9kt6xnhv6')}
subtitle={translate('text_1731507195246zr2p61vihmw')}
icon={
<Avatar size="big" variant="connector-full">
{<Salesforce />}
</Avatar>
}
endIcon={!hasAccessToSalesforcePremiumIntegration ? 'sparkles' : undefined}
onClick={() => {
if (!hasAccessToSalesforcePremiumIntegration) {
premiumWarningDialogRef.current?.openDialog({
title: translate('text_661ff6e56ef7e1b7c542b1ea'),
description: translate('text_661ff6e56ef7e1b7c542b1f6'),
mailtoSubject: translate('text_173150719524652xb2nd3f7r'),
mailtoBody: translate('text_1731507195246xxr17pdnb7s'),
})
} else if (hasSalesforceIntegration) {
navigate(SALESFORCE_INTEGRATION_ROUTE)
} else {
addSalesforceDialogRef.current?.openDialog()
}
endIcon={!hasAccessToSalesforcePremiumIntegration ? 'sparkles' : undefined}
onClick={() => {
if (!hasAccessToSalesforcePremiumIntegration) {
premiumWarningDialogRef.current?.openDialog({
title: translate('text_661ff6e56ef7e1b7c542b1ea'),
description: translate('text_661ff6e56ef7e1b7c542b1f6'),
mailtoSubject: translate('text_173150719524652xb2nd3f7r'),
mailtoBody: translate('text_1731507195246xxr17pdnb7s'),
})
} else if (hasSalesforceIntegration) {
navigate(SALESFORCE_INTEGRATION_ROUTE)
} else {
addSalesforceDialogRef.current?.openDialog()
}
}}
/>
)}
}}
/>
<Selector
title={translate('text_641b42035d62fd004e07cdde')}
subtitle={translate('text_641b420ccd75240062f2386e')}
Expand Down
Loading