diff --git a/packages/console/src/containers/AppContent/components/Topbar/TenantSelector/TenantDropdownItem/Skeleton/index.module.scss b/packages/console/src/containers/AppContent/components/Topbar/TenantSelector/TenantDropdownItem/Skeleton/index.module.scss deleted file mode 100644 index 71a3f493e..000000000 --- a/packages/console/src/containers/AppContent/components/Topbar/TenantSelector/TenantDropdownItem/Skeleton/index.module.scss +++ /dev/null @@ -1,8 +0,0 @@ -@use '@/scss/underscore' as _; - -.skeleton { - @include _.shimmering-animation; - width: 48px; - height: 16px; - border-radius: 6px; -} diff --git a/packages/console/src/containers/AppContent/components/Topbar/TenantSelector/TenantDropdownItem/Skeleton/index.tsx b/packages/console/src/containers/AppContent/components/Topbar/TenantSelector/TenantDropdownItem/Skeleton/index.tsx deleted file mode 100644 index 953e0c3dd..000000000 --- a/packages/console/src/containers/AppContent/components/Topbar/TenantSelector/TenantDropdownItem/Skeleton/index.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import * as styles from './index.module.scss'; - -function Skeleton() { - return
; -} - -export default Skeleton; diff --git a/packages/console/src/containers/AppContent/components/Topbar/TenantSelector/TenantDropdownItem/TenantStatusTag.tsx b/packages/console/src/containers/AppContent/components/Topbar/TenantSelector/TenantDropdownItem/TenantStatusTag.tsx index ddb70c9f2..3f5f5be0d 100644 --- a/packages/console/src/containers/AppContent/components/Topbar/TenantSelector/TenantDropdownItem/TenantStatusTag.tsx +++ b/packages/console/src/containers/AppContent/components/Topbar/TenantSelector/TenantDropdownItem/TenantStatusTag.tsx @@ -8,8 +8,6 @@ import useSubscriptionPlan from '@/hooks/use-subscription-plan'; import useSubscriptionUsage from '@/hooks/use-subscription-usage'; import { getLatestUnpaidInvoice } from '@/utils/subscription'; -import Skeleton from './Skeleton'; - type Props = { tenantId: string; className?: string; @@ -30,7 +28,7 @@ function TenantStatusTag({ tenantId, className }: Props) { ); if (isLoadingUsage || isLoadingInvoice || isLoadingSubscription) { - return ; + return null; } /** diff --git a/packages/console/src/containers/AppContent/components/Topbar/TenantSelector/TenantDropdownItem/index.module.scss b/packages/console/src/containers/AppContent/components/Topbar/TenantSelector/TenantDropdownItem/index.module.scss index 8f9954dc6..e7e739bf1 100644 --- a/packages/console/src/containers/AppContent/components/Topbar/TenantSelector/TenantDropdownItem/index.module.scss +++ b/packages/console/src/containers/AppContent/components/Topbar/TenantSelector/TenantDropdownItem/index.module.scss @@ -43,10 +43,11 @@ margin-top: _.unit(0.5); font: var(--font-body-3); color: var(--color-text-secondary); + // Keep the height of the item consistent when the plan name is loading + min-height: 16px; } } - .checkIcon { width: 20px; height: 20px; diff --git a/packages/console/src/containers/AppContent/components/Topbar/TenantSelector/TenantDropdownItem/index.tsx b/packages/console/src/containers/AppContent/components/Topbar/TenantSelector/TenantDropdownItem/index.tsx index 7801f1e66..b18a7ca4b 100644 --- a/packages/console/src/containers/AppContent/components/Topbar/TenantSelector/TenantDropdownItem/index.tsx +++ b/packages/console/src/containers/AppContent/components/Topbar/TenantSelector/TenantDropdownItem/index.tsx @@ -8,7 +8,6 @@ import useSubscriptionPlan from '@/hooks/use-subscription-plan'; import TenantEnvTag from '../TenantEnvTag'; -import Skeleton from './Skeleton'; import TenantStatusTag from './TenantStatusTag'; import * as styles from './index.module.scss'; @@ -30,9 +29,7 @@ function TenantDropdownItem({ tenantData, isSelected, onClick }: Props) {
-
- {tenantPlan ? : } -
+
{tenantPlan && }