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:
parent
4865610b51
commit
8c4bfbce16
2 changed files with 14 additions and 5 deletions
5
.changeset/tame-crabs-breathe.md
Normal file
5
.changeset/tame-crabs-breathe.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@logto/console": patch
|
||||
---
|
||||
|
||||
Remove the upsell tag on social connectors creation modal in OSS version.
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue