How to use the arc.arc.dao function in arc

To help you get started, we’ve selected a few arc 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 daostack / alchemy / src / components / DebugContainer.tsx View on Github external
const ProposalsContainer = (props: { daoAvatarAddress: string }) => {
  return {
    (state: IObservableState): any => {
      if (state.isLoading) {
        return  <div>loading proposals</div>
      } else if (state.error) {
        throw state.error
      } else {
        if (state.data.length == 0) {
          return <div> no proposals found</div>
        }
        return <div>
            <span>found {state.data.length} proposals: </span>
            { state.data.map((proposal: IProposalState) =&gt; {
              return <div>
                id: { proposal.id }
              </div>
            })}</div>
github daostack / alchemy / src / components / DebugContainer.tsx View on Github external
export default (props: RouteComponentProps) =&gt; {
  const daoAddress = props.match.params.daoAvatarAddress
  if (daoAddress) {
      return {(state: IObservableState) =&gt; {
          if (state.error) {
            return <div>{ state.error.message }</div>
          } else if (state.data) {
            return 
          } else {
            return <div>Loading DebugContainer</div>
          }
        }
      }
  } else {
    throw Error(`no address! `)
  }
}