Move hooks folder (#68)

This commit is contained in:
Szymon Szlachtowicz 2021-06-28 14:20:56 +02:00 committed by GitHub
parent 59be0ec826
commit bdf53d556f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 21 additions and 21 deletions

View File

@ -13,7 +13,7 @@ import binIcon from '../assets/images/bin.svg'
import { RemoveModal } from './card/RemoveModal'
import { useEthers } from '@usedapp/core'
import { useContractFunction } from '@usedapp/core'
import { useContracts } from './hooks/useContracts'
import { useContracts } from '../hooks/useContracts'
import { getVotingWinner } from '../helpers/voting'
interface CardCommunityProps {

View File

@ -11,7 +11,7 @@ import { FeatureModal } from './FeatureModal'
import { VoteConfirmModal } from './VoteConfirmModal'
import { OngoingVote } from './OngoingVote'
import { useEthers } from '@usedapp/core'
import { useContracts } from '../hooks/useContracts'
import { useContracts } from '../../hooks/useContracts'
import { useContractCall } from '@usedapp/core'
interface CardFeatureProps {

View File

@ -10,7 +10,7 @@ import { ConfirmBtn } from './VoteConfirmModal'
import { useContractFunction } from '@usedapp/core'
import { useContracts } from '../hooks/useContracts'
import { useContracts } from '../../hooks/useContracts'
interface ProposeModalProps {
availableAmount: number

View File

@ -5,7 +5,7 @@ import { ButtonSecondary } from '../Button'
import { CurrentVoting } from '../../models/community'
import { VotePropose } from '../votes/VotePropose'
import { VoteType } from '../../constants/voteTypes'
import { useSendWakuVote } from '../hooks/useSendWakuVote'
import { useSendWakuVote } from '../../hooks/useSendWakuVote'
export interface VoteModalProps {
vote: CurrentVoting

View File

@ -3,7 +3,7 @@ import { Card, CardCommunity, CardCommunityWrap, CardVoteWrap } from '../Card'
import { CardFeature } from '../card/CardFeature'
import styled from 'styled-components'
import { CommunityDetail, DirectorySortingEnum } from '../../models/community'
import { useCommunities } from '../hooks/useCommunities'
import { useCommunities } from '../../hooks/useCommunities'
import { getCommunitiesInDirectory } from '../../helpers/apiMock'
import { FilterList } from '../Filter'
import { Search } from '../Input'

View File

@ -1,9 +1,9 @@
import { useContractFunction } from '@usedapp/core'
import React from 'react'
import { Card, CardCommunity, CardCommunityWrap, CardVote, CardVoteWrap } from '../Card'
import { useCommunity } from '../hooks/useCommunity'
import { useContracts } from '../hooks/useContracts'
import { useVotesAggregate } from '../hooks/useVotesAggregate'
import { useCommunity } from '../../hooks/useCommunity'
import { useContracts } from '../../hooks/useContracts'
import { useVotesAggregate } from '../../hooks/useVotesAggregate'
import { VotingCardSkeleton } from './VotingCardSkeleton'
interface VotingCardProps {

View File

@ -9,7 +9,7 @@ import { VotingCard } from './VotingCard'
import { Search } from '../Input'
import { useContractCall } from '@usedapp/core'
import { VotingSortingOptions } from '../../constants/SortingOptions'
import { useContracts } from '../hooks/useContracts'
import { useContracts } from '../../hooks/useContracts'
export function VotingCards() {
const { votingContract } = useContracts()

View File

@ -1,6 +1,6 @@
import { useState, useEffect } from 'react'
import { CommunityDetail } from '../../models/community'
import { APIOptions, APIFunction } from './../../models/api'
import { CommunityDetail } from '../models/community'
import { APIOptions, APIFunction } from './../models/api'
export function useCommunities(API: APIFunction, options: APIOptions) {
const [communities, setCommunities] = useState<CommunityDetail[]>([])

View File

@ -1,9 +1,9 @@
import { useContractCall } from '@usedapp/core'
import { useEffect, useState } from 'react'
import { getCommunityDetails } from '../../helpers/apiMock'
import { CommunityDetail } from '../../models/community'
import { getCommunityDetails } from '../helpers/apiMock'
import { CommunityDetail } from '../models/community'
import { useContracts } from './useContracts'
import voting from '../../helpers/voting'
import voting from '../helpers/voting'
export function useCommunity(room: number) {
const { votingContract } = useContracts()

View File

@ -1,5 +1,5 @@
import { useEthers } from '@usedapp/core'
import { useConfig } from '../../providers/config'
import { useConfig } from '../providers/config'
import { Contract } from '@usedapp/core/node_modules/ethers'
import { Interface } from '@ethersproject/abi'
import { MockContract } from '@status-community-dapp/contracts/abi'

View File

@ -1,8 +1,8 @@
import { useCallback } from 'react'
import { useWaku } from '../../providers/waku/provider'
import { useWaku } from '../providers/waku/provider'
import { useEthers } from '@usedapp/core'
import { useConfig } from '../../providers/config'
import { createWakuMessage } from '../../helpers/wakuMessage'
import { useConfig } from '../providers/config'
import { createWakuMessage } from '../helpers/wakuMessage'
export function useSendWakuVote() {
const { waku } = useWaku()

View File

@ -1,10 +1,10 @@
import { useState, useEffect } from 'react'
import { useWaku } from '../../providers/waku/provider'
import { useWaku } from '../providers/waku/provider'
import { useContractCall } from '@usedapp/core'
import { useConfig } from '../../providers/config'
import { useConfig } from '../providers/config'
import { useContracts } from '../hooks/useContracts'
import wakuMessage from '../../helpers/wakuMessage'
import wakuMessage from '../helpers/wakuMessage'
export function useVotesAggregate(room: number) {
const { config } = useConfig()