'use client' import type { FC } from 'react' import React from 'react' import { createPortal } from 'react-dom' import { useTranslation } from 'react-i18next' import { RiCloseLine } from '@remixicon/react' import { Plan } from '../type' import SelectPlanRange, { PlanRange } from './select-plan-range' import PlanItem from './plan-item' import { useProviderContext } from '@/context/provider-context' import GridMask from '@/app/components/base/grid-mask' import { useAppContext } from '@/context/app-context' type Props = { onCancel: () => void } const Pricing: FC = ({ onCancel, }) => { const { t } = useTranslation() const { plan } = useProviderContext() const { isCurrentWorkspaceManager } = useAppContext() const canPay = isCurrentWorkspaceManager const [planRange, setPlanRange] = React.useState(PlanRange.monthly) return createPortal(
e.stopPropagation()} >
{t('billing.plansCommon.title')}
, document.body, ) } export default React.memo(Pricing)