'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 PlanRangeSwitcherProps = { value: PlanRange onChange: (value: PlanRange) => void } const PlanRangeSwitcher: FC = ({ value, onChange, }) => { const { t } = useTranslation() return (
{ onChange(v ? PlanRange.yearly : PlanRange.monthly) }} /> {t('billing.plansCommon.annualBilling', { percent: 17 })}
) } export default React.memo(PlanRangeSwitcher)