0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Added logic for disabled state for the dropdown

refs GRO-141
This commit is contained in:
Djordje Vlaisavljevic 2023-12-04 18:08:03 +00:00
parent 7026b28e17
commit f1511e6081

View file

@ -145,7 +145,7 @@ const SignupOptions: React.FC<{
]}
title='Prices available at signup'
/>
{hasPortalImprovements && <Select options={selectOptions} selectedOption={selectOptions.find(option => option.value === 'default-yearly')} title='Price shown by default' onSelect={(value) => {
{hasPortalImprovements && <Select disabled={(portalPlans.includes('yearly') && portalPlans.includes('monthly')) ? false : true} options={selectOptions} selectedOption={selectOptions.find(option => option.value === (portalPlans.includes('yearly') ? 'default-yearly' : 'default-monthly'))} title='Price shown by default' onSelect={(value) => {
alert(value);
}} />}
</>