1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-06-29 00:57:50 +02:00

pricing tab selection fixes

This commit is contained in:
Matthias Kretschmann 2021-10-27 17:56:40 +01:00
parent 928a352975
commit cdbe413765
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 4 additions and 3 deletions

View File

@ -9,4 +9,4 @@ export function useSiteMetadata(): UseSiteMetadata {
}
return siteMeta
}
}

View File

@ -32,7 +32,8 @@ export default function PricingFields(): ReactElement {
// Always update everything when price value changes
useEffect(() => {
if (type === 'fixed') return
if (type === 'fixed' || type === 'free') return
const dtAmount =
isValidNumber(oceanAmount) &&
isValidNumber(weightOnOcean) &&
@ -72,7 +73,7 @@ export default function PricingFields(): ReactElement {
<Tabs
items={tabs}
handleTabChange={handleTabChange}
defaultIndex={type === 'fixed' ? 0 : 1}
defaultIndex={type === 'fixed' ? 0 : type === 'dynamic' ? 1 : 2}
className={styles.pricing}
/>
)