Skip to content

Commit

Permalink
DAO-25 fix banner height issue in mobile and updated minimal amount t…
Browse files Browse the repository at this point in the history
…o create organization (#1559)
  • Loading branch information
yuetloo authored Jul 22, 2021
1 parent 29e57ff commit 1908e7a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions src/components/Migrate/MigrateBanner.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import React, { useMemo } from 'react'
import PropTypes from 'prop-types'
import { Transition, animated } from 'react-spring'
import { Button, springs, useViewport } from '@aragon/ui'
Expand All @@ -14,24 +14,24 @@ const BANNER_TEXT = {

const MigrateBanner = React.memo(({ visible, onClose }) => {
const { width } = useViewport()
const compact = width < 570
const bannerHeight = compact ? 70 : BANNER_HEIGHT
const compact = useMemo(() => width < 570, [width])
const bannerHeight = useMemo(() => (compact ? 70 : BANNER_HEIGHT), [compact])

return (
<React.Fragment>
<Transition
items={visible}
from={{ height: 0 }}
enter={{ height: bannerHeight }}
leave={{ height: 0 }}
from={{ opacity: 0 }}
enter={{ opacity: 1 }}
leave={{ opacity: 0 }}
config={springs.smooth}
native
>
{visible =>
visible &&
/* eslint-disable react/prop-types */
(({ height }) => (
<animated.div style={{ overflow: 'hidden', height }}>
(({ opacity }) => (
<animated.div style={{ opacity }}>
<Banner
text={compact ? BANNER_TEXT.compact : BANNER_TEXT.large}
button={
Expand Down
2 changes: 1 addition & 1 deletion src/onboarding/validate-requirements.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import BN from 'bn.js'
import { fromWei, toWei, formatBalance } from '../web3-utils'

const MINIMUM_BALANCE = new BN(toWei('0.1'))
const MINIMUM_BALANCE = new BN(toWei('0.2'))
const BALANCE_DECIMALS = 3

function isBalanceUnknown(balance) {
Expand Down

0 comments on commit 1908e7a

Please sign in to comment.