'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)