Skip to content

Commit

Permalink
fix(console): fix enterprise tenants not displayed issue (#6695)
Browse files Browse the repository at this point in the history
  • Loading branch information
darcyYe authored Oct 21, 2024
1 parent aab356d commit e3374d0
Showing 1 changed file with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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 (
Expand Down

0 comments on commit e3374d0

Please sign in to comment.