How to use the @aragon/api-react.useNetwork function in @aragon/api-react

To help you get started, we’ve selected a few @aragon/api-react examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github 1Hive / time-lock-app / app / src / components / InfoBoxes.js View on Github external
export default props => {
  const network = useNetwork()
  const theme = useTheme()
  return 
}
github 1Hive / token-request-app / app / src / components / TokenSelector.js View on Github external
export default props => {
  const network = useNetwork()
  return 
}
github AutarkLabs / open-enterprise / apps / allocations / app / components / App / AllocationsHistory.js View on Github external
const AllocationsHistory = ({ allocations, skipBudgetColumn }) => {
  const theme = useTheme()
  const { layoutName } = useLayout()
  const { balances = [], budgets = [] } = useAppState()
  const network = useNetwork()
  const getTokenSymbol = inputAddress => {
    const matchingBalance = balances.find(({ address }) => addressesEqual(inputAddress, address))
    return matchingBalance ? matchingBalance.symbol : ''
  }
  const getBudgetName = inputId => {
    const matchingName = budgets.find(({ id }) => inputId === id)
    return matchingName ? matchingName.name : `# ${inputId}`
  }
  const fields = [
    'Date',
    { label: 'Recipients', childStart: true },
    'Description',
    'Status',
    'Amount'
  ]
  if (!skipBudgetColumn) {
github AutarkLabs / open-enterprise / apps / address-book / app / components / LocalIdentityBadge / LocalIdentityBadge.js View on Github external
const LocalIdentityBadge = ({ entity, forceAddress, ...props }) => {
  const network = useNetwork()
  const [ label, showLocalIdentityModal ] = useIdentity(entity)
  const handleClick = () => showLocalIdentityModal(entity)
  return (
    ,
        onClick: handleClick,
      }}
      popoverTitle={
        label ?  : undefined
      }
      {...props}
    />
github 1Hive / token-request-app / app / src / screens / RequestDetail.js View on Github external
const RequestDetail = ({ request, token, onBack, onSubmit, onWithdraw }) => {
  const { layoutName } = useLayout()
  const theme = useTheme()
  const connectedAccount = useConnectedAccount()
  const network = useNetwork()
  const {
    requestId,
    requesterAddress,
    depositAmount,
    depositSymbol,
    requestAmount,
    depositDecimals,
    depositToken,
    reference,
    date,
    status,
  } = request
  const depositFormated = formatTokenAmount(depositAmount, false, depositDecimals, token.decimals)
  const requestFormated = formatTokenAmount(requestAmount, false, token.decimals, token.decimals)
  const requestRounded = formatTokenAmountSymbol(token.symbol, requestAmount, token.decimals)
  const title = `#${requestId} - ${requestRounded} requested by`

@aragon/api-react

Aragon app API for React

AGPL-3.0
Latest version published 3 years ago

Package Health Score

54 / 100
Full package analysis