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