From 0b2226de5c4a263d8a5ed34a94c277fc5c66e951 Mon Sep 17 00:00:00 2001 From: Darcy Ye Date: Thu, 1 Feb 2024 12:18:28 +0800 Subject: [PATCH] fix(console): upsell should locate on modal footer (#5356) --- .../console/src/pages/EnterpriseSso/index.tsx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/packages/console/src/pages/EnterpriseSso/index.tsx b/packages/console/src/pages/EnterpriseSso/index.tsx index 9624dfd59..9dbcff09c 100644 --- a/packages/console/src/pages/EnterpriseSso/index.tsx +++ b/packages/console/src/pages/EnterpriseSso/index.tsx @@ -1,7 +1,7 @@ import { withAppInsights } from '@logto/app-insights/react'; import { type SsoConnectorWithProviderConfig, ReservedPlanId } from '@logto/schemas'; import { conditional } from '@silverhand/essentials'; -import { useContext, useCallback } from 'react'; +import { useContext } from 'react'; import { useTranslation } from 'react-i18next'; import { useLocation } from 'react-router-dom'; import useSWR from 'swr'; @@ -13,7 +13,6 @@ import ItemPreview from '@/components/ItemPreview'; import ListPage from '@/components/ListPage'; import { defaultPageSize } from '@/consts'; import { isCloud } from '@/consts/env'; -import { subscriptionPage } from '@/consts/pages'; import { SubscriptionDataContext } from '@/contexts/SubscriptionDataProvider'; import { TenantsContext } from '@/contexts/TenantsProvider'; import Button from '@/ds-components/Button'; @@ -46,10 +45,6 @@ function EnterpriseSsoConnectors() { const isSsoEnabled = !isCloud || currentPlan.quota.ssoEnabled; - const handleButtonClick = useCallback(() => { - navigate(isSsoEnabled ? createEnterpriseSsoPathname : subscriptionPage); - }, [isSsoEnabled, navigate]); - const url = buildUrl('api/sso-connectors', { page: String(page), page_size: String(pageSize), @@ -150,11 +145,13 @@ function EnterpriseSsoConnectors() { description="enterprise_sso.placeholder_description" action={