Skip to content

Commit

Permalink
fix: display Celo price
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse-Sawa committed Jul 8, 2022
1 parent 88455f7 commit cff0e11
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/components/Header/TopBar.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import React from 'react'
import styled from 'styled-components'
import { RowBetween, RowFixed, AutoRow } from 'components/Row'
import { TYPE, ExternalLink } from 'theme'
import { AutoRow, RowBetween, RowFixed } from 'components/Row'
import { ExternalLink, TYPE } from 'theme'
import { useEthPrices } from 'hooks/useEthPrices'
import { formatDollarAmount } from 'utils/numbers'
import Polling from './Polling'
import { useActiveNetworkVersion } from '../../state/application/hooks'
import { SupportedNetwork } from '../../constants/networks'

const Wrapper = styled.div`
width: 100%;
Expand All @@ -23,13 +25,14 @@ const StyledLink = styled(ExternalLink)`

const TopBar = () => {
const ethPrices = useEthPrices()
const [activeNetwork] = useActiveNetworkVersion()
return (
<Wrapper>
<RowBetween>
<Polling />
<AutoRow gap="6px">
<RowFixed>
<Item>ETH Price:</Item>
{activeNetwork.id === SupportedNetwork.CELO ? <Item>Celo Price:</Item> : <Item>Eth Price:</Item>}
<Item fontWeight="700" ml="4px">
{formatDollarAmount(ethPrices?.current)}
</Item>
Expand Down

0 comments on commit cff0e11

Please sign in to comment.