0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

fix(console): fix enterprise tenants not displayed issue (#6695)

This commit is contained in:
Darcy Ye 2024-10-21 17:14:54 +08:00 committed by GitHub
parent aab356d7ed
commit e3374d073c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,13 +1,11 @@
import { TenantTag } from '@logto/schemas';
import classNames from 'classnames';
import { useContext, useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import Tick from '@/assets/icons/tick.svg?react';
import { type TenantResponse } from '@/cloud/types/router';
import { regionFlagMap } from '@/components/Region';
import SkuName from '@/components/SkuName';
import { SubscriptionDataContext } from '@/contexts/SubscriptionDataProvider';
import { DropdownItem } from '@/ds-components/Dropdown';
import TenantStatusTag from './TenantStatusTag';
@ -28,16 +26,6 @@ function TenantDropdownItem({ tenantData, isSelected, onClick }: Props) {
} = tenantData;
const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' });
const { logtoSkus } = useContext(SubscriptionDataContext);
const tenantSubscriptionSku = useMemo(
() => logtoSkus.find(({ id }) => id === planId),
[logtoSkus, planId]
);
if (!tenantSubscriptionSku) {
return null;
}
const RegionFlag = regionFlagMap[regionName];
return (