mirror of
https://github.com/logto-io/logto.git
synced 2025-03-31 22:51:25 -05:00
fix(console): upsell should locate on modal footer (#5356)
This commit is contained in:
parent
9cddd78adc
commit
0b2226de5c
1 changed files with 6 additions and 9 deletions
|
@ -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={
|
||||
<Button
|
||||
title={isSsoEnabled ? 'enterprise_sso.create' : 'upsell.upgrade_plan'}
|
||||
title="enterprise_sso.create"
|
||||
type="primary"
|
||||
size="large"
|
||||
icon={conditional(isSsoEnabled && <Plus />)}
|
||||
onClick={handleButtonClick}
|
||||
icon={<Plus />}
|
||||
onClick={() => {
|
||||
navigate(createEnterpriseSsoPathname);
|
||||
}}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
|
Loading…
Add table
Reference in a new issue