mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
fix(console): should not block custom JWT creation for OSS user (#6441)
This commit is contained in:
parent
6a809e1307
commit
ff6b304bac
2 changed files with 11 additions and 4 deletions
5
.changeset/friendly-rice-sell.md
Normal file
5
.changeset/friendly-rice-sell.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@logto/console": patch
|
||||
---
|
||||
|
||||
fix: should not show custom JWT paywall for OSS users
|
|
@ -3,7 +3,7 @@ import { useCallback, useContext } from 'react';
|
|||
import { Trans, useTranslation } from 'react-i18next';
|
||||
|
||||
import ContactUsPhraseLink from '@/components/ContactUsPhraseLink';
|
||||
import { isDevFeaturesEnabled } from '@/consts/env';
|
||||
import { isCloud, isDevFeaturesEnabled } from '@/consts/env';
|
||||
import { SubscriptionDataContext } from '@/contexts/SubscriptionDataProvider';
|
||||
import Button from '@/ds-components/Button';
|
||||
import { useConfirmModal } from '@/hooks/use-confirm-modal';
|
||||
|
@ -23,9 +23,11 @@ function CreateButton({ isDisabled, tokenType }: Props) {
|
|||
|
||||
const { currentPlan, currentSubscriptionQuota } = useContext(SubscriptionDataContext);
|
||||
|
||||
const isCustomJwtEnabled = isDevFeaturesEnabled
|
||||
? currentSubscriptionQuota.customJwtEnabled
|
||||
: currentPlan.quota.customJwtEnabled;
|
||||
const isCustomJwtEnabled =
|
||||
!isCloud ||
|
||||
(isDevFeaturesEnabled
|
||||
? currentSubscriptionQuota.customJwtEnabled
|
||||
: currentPlan.quota.customJwtEnabled);
|
||||
|
||||
const onCreateButtonClick = useCallback(async () => {
|
||||
if (isCustomJwtEnabled) {
|
||||
|
|
Loading…
Reference in a new issue