mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 01:18:05 +08:00
refactor(web): make Switch controlled-only and migrate call sites (#32399)
This commit is contained in:
@ -24,12 +24,12 @@ const PlanRangeSwitcher: FC<PlanRangeSwitcherProps> = ({
|
||||
<div className="flex items-center justify-end gap-x-3 pr-5">
|
||||
<Switch
|
||||
size="l"
|
||||
defaultValue={value === PlanRange.yearly}
|
||||
value={value === PlanRange.yearly}
|
||||
onChange={(v) => {
|
||||
onChange(v ? PlanRange.yearly : PlanRange.monthly)
|
||||
}}
|
||||
/>
|
||||
<span className="system-md-regular text-text-tertiary">
|
||||
<span className="text-text-tertiary system-md-regular">
|
||||
{t('plansCommon.annualBilling', { ns: 'billing', percent: 17 })}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user