feat: check whether the app runs within bee-desktop is now an environment variable (#490)

* feat: check whether the app runs within bee-desktop is now an environment variable

* chore: remove console.log
This commit is contained in:
Vojtech Simetka
2022-07-25 10:28:17 +02:00
committed by GitHub
parent 6bfe97be5d
commit f01477ea70
9 changed files with 45 additions and 55 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ import { SwarmButton } from '../../components/SwarmButton'
import { ROUTES } from '../../routes'
import { Context as BeeContext } from '../../providers/Bee'
import { Context as TopUpContext } from '../../providers/TopUp'
import { useIsBeeDesktop } from '../../hooks/apiHooks'
import config from '../../config'
import { BeeModes } from '@ethersphere/bee-js'
import { restartBeeNode, upgradeToLightNode } from '../../utils/desktop'
import { Loading } from '../../components/Loading'
@@ -38,7 +38,7 @@ const MINIMUM_XBZZ = '0.1'
export default function TopUp(): ReactElement {
const navigate = useNavigate()
const styles = useStyles()
const { isBeeDesktop } = useIsBeeDesktop()
const isBeeDesktop = config.BEE_DESKTOP_ENABLED
const { balance, nodeInfo } = useContext(BeeContext)
const { providerUrl } = useContext(TopUpContext)
const [loading, setLoading] = useState(false)