+
{ICON_MAP[plan]}
@@ -129,4 +129,4 @@ const PlanItem: FC
= ({
)
}
-export default React.memo(PlanItem)
+export default React.memo(CloudPlanItem)
diff --git a/web/app/components/billing/pricing/plans/plan-item/list/index.tsx b/web/app/components/billing/pricing/plans/cloud-plan-item/list/index.tsx
similarity index 100%
rename from web/app/components/billing/pricing/plans/plan-item/list/index.tsx
rename to web/app/components/billing/pricing/plans/cloud-plan-item/list/index.tsx
diff --git a/web/app/components/billing/pricing/plans/plan-item/list/item/index.tsx b/web/app/components/billing/pricing/plans/cloud-plan-item/list/item/index.tsx
similarity index 100%
rename from web/app/components/billing/pricing/plans/plan-item/list/item/index.tsx
rename to web/app/components/billing/pricing/plans/cloud-plan-item/list/item/index.tsx
diff --git a/web/app/components/billing/pricing/plans/plan-item/list/item/tooltip.tsx b/web/app/components/billing/pricing/plans/cloud-plan-item/list/item/tooltip.tsx
similarity index 100%
rename from web/app/components/billing/pricing/plans/plan-item/list/item/tooltip.tsx
rename to web/app/components/billing/pricing/plans/cloud-plan-item/list/item/tooltip.tsx
diff --git a/web/app/components/billing/pricing/plans/index.tsx b/web/app/components/billing/pricing/plans/index.tsx
index 8360542ffb..5142763531 100644
--- a/web/app/components/billing/pricing/plans/index.tsx
+++ b/web/app/components/billing/pricing/plans/index.tsx
@@ -1,7 +1,8 @@
import Divider from '@/app/components/base/divider'
-import { type BasicPlan, Plan, type UsagePlanInfo } from '../../type'
-import PlanItem from './plan-item'
+import { type BasicPlan, Plan, SelfHostedPlan, type UsagePlanInfo } from '../../type'
+import CloudPlanItem from './cloud-plan-item'
import type { PlanRange } from '../plan-switcher/plan-range-switcher'
+import SelfHostedPlanItem from './self-hosted-plan-item'
type PlansProps = {
plan: {
@@ -26,21 +27,21 @@ const Plans = ({
{
currentPlan === 'cloud' && (
<>
-
-
-
- //
- //
- //
- // >
+ currentPlan === 'self' && <>
+
+
+
+ >
}
diff --git a/web/app/components/billing/pricing/self-hosted-plan-item.tsx b/web/app/components/billing/pricing/plans/self-hosted-plan-item/index.tsx
similarity index 92%
rename from web/app/components/billing/pricing/self-hosted-plan-item.tsx
rename to web/app/components/billing/pricing/plans/self-hosted-plan-item/index.tsx
index b937d5fc53..62b9e015e0 100644
--- a/web/app/components/billing/pricing/self-hosted-plan-item.tsx
+++ b/web/app/components/billing/pricing/plans/self-hosted-plan-item/index.tsx
@@ -3,12 +3,12 @@ import type { FC, ReactNode } from 'react'
import React from 'react'
import { useTranslation } from 'react-i18next'
import { RiArrowRightUpLine, RiBrain2Line, RiCheckLine, RiQuestionLine } from '@remixicon/react'
-import { SelfHostedPlan } from '../type'
-import { contactSalesUrl, getStartedWithCommunityUrl, getWithPremiumUrl } from '../config'
-import Toast from '../../base/toast'
-import Tooltip from '../../base/tooltip'
-import { Asterisk, AwsMarketplace, Azure, Buildings, Diamond, GoogleCloud } from '../../base/icons/src/public/billing'
-import type { PlanRange } from './select-plan-range'
+import { SelfHostedPlan } from '../../../type'
+import { contactSalesUrl, getStartedWithCommunityUrl, getWithPremiumUrl } from '../../../config'
+import Toast from '../../../../base/toast'
+import Tooltip from '../../../../base/tooltip'
+import { Asterisk, AwsMarketplace, Azure, Buildings, Diamond, GoogleCloud } from '../../../../base/icons/src/public/billing'
+import type { PlanRange } from '../../plan-switcher/plan-range-switcher'
import cn from '@/utils/classnames'
import { useAppContext } from '@/context/app-context'
@@ -113,8 +113,8 @@ const SelfHostedPlanItem: FC
= ({
- {isEnterprisePlan &&
}
- {isEnterprisePlan &&
}
+ {isEnterprisePlan &&
}
+ {isEnterprisePlan &&
}
diff --git a/web/app/components/billing/pricing/select-plan-range.tsx b/web/app/components/billing/pricing/select-plan-range.tsx
deleted file mode 100644
index e7b06cb2ca..0000000000
--- a/web/app/components/billing/pricing/select-plan-range.tsx
+++ /dev/null
@@ -1,54 +0,0 @@
-'use client'
-import type { FC } from 'react'
-import React from 'react'
-import { useTranslation } from 'react-i18next'
-import Switch from '../../base/switch'
-export enum PlanRange {
- monthly = 'monthly',
- yearly = 'yearly',
-}
-
-type Props = {
- value: PlanRange
- onChange: (value: PlanRange) => void
-}
-
-const ArrowIcon = (
-
-)
-
-const SelectPlanRange: FC
= ({
- value,
- onChange,
-}) => {
- const { t } = useTranslation()
-
- return (
-
-
{t('billing.plansCommon.yearlyTip')}
-
- {t('billing.plansCommon.annualBilling')}
- {
- onChange(v ? PlanRange.yearly : PlanRange.monthly)
- }} />
-
-
- {ArrowIcon}
-
-
- )
-}
-export default React.memo(SelectPlanRange)