mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
pricing tab selection fixes
This commit is contained in:
parent
928a352975
commit
cdbe413765
@ -9,4 +9,4 @@ export function useSiteMetadata(): UseSiteMetadata {
|
||||
}
|
||||
|
||||
return siteMeta
|
||||
}
|
||||
}
|
||||
|
@ -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}
|
||||
/>
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user