0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-30 20:33:54 -05:00

fix(console): should hide upsell tag for standard connectors in OSS version (#5066)

This commit is contained in:
Darcy Ye 2023-12-06 16:47:25 +08:00 committed by GitHub
parent 4865610b51
commit 8c4bfbce16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 5 deletions

View file

@ -0,0 +1,5 @@
---
"@logto/console": patch
---
Remove the upsell tag on social connectors creation modal in OSS version.

View file

@ -8,6 +8,7 @@ import { useContext, useMemo, useState } from 'react';
import Modal from 'react-modal';
import useSWR from 'swr';
import { isCloud } from '@/consts/env';
import { TenantsContext } from '@/contexts/TenantsProvider';
import DynamicT from '@/ds-components/DynamicT';
import ModalLayout from '@/ds-components/ModalLayout';
@ -46,6 +47,7 @@ function CreateConnectorForm({ onClose, isOpen: isFormOpen, type }: Props) {
const isCreatingSocialConnector = type === ConnectorType.Social;
const { currentTenantId } = useContext(TenantsContext);
const { data: currentPlan } = useSubscriptionPlan(currentTenantId);
const isStandardConnectorDisabled = !currentPlan?.quota.standardConnectorsLimit;
const groups = useMemo(() => {
@ -160,11 +162,13 @@ function CreateConnectorForm({ onClose, isOpen: isFormOpen, type }: Props) {
<>
<div className={styles.standardLabel}>
<DynamicT forKey="connectors.standard_connectors" />
<FeatureTag
isVisible={isStandardConnectorDisabled}
for="upsell"
plan={ReservedPlanId.Hobby}
/>
{isCloud && (
<FeatureTag
isVisible={isStandardConnectorDisabled}
for="upsell"
plan={ReservedPlanId.Hobby}
/>
)}
</div>
<ConnectorRadioGroup
name="group"