'use client' import type { FC } from 'react' import React from 'react' import { useTranslation } from 'react-i18next' import cn from '@/utils/classnames' export enum PlanRange { monthly = 'monthly', yearly = 'yearly', } type Props = { value: PlanRange onChange: (value: PlanRange) => void } const ITem: FC<{ isActive: boolean; value: PlanRange; text: string; onClick: (value: PlanRange) => void }> = ({ isActive, value, text, onClick }) => { return (
onClick(value)} > {text}
) } const ArrowIcon = ( ) const SelectPlanRange: FC = ({ value, onChange, }) => { const { t } = useTranslation() return (
{t('billing.plansCommon.yearlyTip')}
{ArrowIcon}
) } export default React.memo(SelectPlanRange)