'use client' import type { FC } from 'react' import * as 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('plansCommon.annualBilling', { ns: 'billing', percent: 17 })}
) } export default React.memo(PlanRangeSwitcher)