diff --git a/packages/DApp/src/components/Card.tsx b/packages/DApp/src/components/Card.tsx index c327c4c..1989dcf 100644 --- a/packages/DApp/src/components/Card.tsx +++ b/packages/DApp/src/components/Card.tsx @@ -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 { diff --git a/packages/DApp/src/components/card/CardFeature.tsx b/packages/DApp/src/components/card/CardFeature.tsx index bfa3b51..c654d23 100644 --- a/packages/DApp/src/components/card/CardFeature.tsx +++ b/packages/DApp/src/components/card/CardFeature.tsx @@ -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 { diff --git a/packages/DApp/src/components/card/ProposeModal.tsx b/packages/DApp/src/components/card/ProposeModal.tsx index f36a740..168d7e0 100644 --- a/packages/DApp/src/components/card/ProposeModal.tsx +++ b/packages/DApp/src/components/card/ProposeModal.tsx @@ -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 diff --git a/packages/DApp/src/components/card/VoteModal.tsx b/packages/DApp/src/components/card/VoteModal.tsx index 8d0ab39..f4c8d6b 100644 --- a/packages/DApp/src/components/card/VoteModal.tsx +++ b/packages/DApp/src/components/card/VoteModal.tsx @@ -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 diff --git a/packages/DApp/src/components/directory/DirectoryCards.tsx b/packages/DApp/src/components/directory/DirectoryCards.tsx index 9cd1540..e0b4eeb 100644 --- a/packages/DApp/src/components/directory/DirectoryCards.tsx +++ b/packages/DApp/src/components/directory/DirectoryCards.tsx @@ -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' diff --git a/packages/DApp/src/components/votes/VotingCard.tsx b/packages/DApp/src/components/votes/VotingCard.tsx index aea2ecb..e3af5c9 100644 --- a/packages/DApp/src/components/votes/VotingCard.tsx +++ b/packages/DApp/src/components/votes/VotingCard.tsx @@ -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 { diff --git a/packages/DApp/src/components/votes/VotingCards.tsx b/packages/DApp/src/components/votes/VotingCards.tsx index 70178fa..9f9339a 100644 --- a/packages/DApp/src/components/votes/VotingCards.tsx +++ b/packages/DApp/src/components/votes/VotingCards.tsx @@ -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() diff --git a/packages/DApp/src/components/hooks/useCommunities.ts b/packages/DApp/src/hooks/useCommunities.ts similarity index 94% rename from packages/DApp/src/components/hooks/useCommunities.ts rename to packages/DApp/src/hooks/useCommunities.ts index 3831c6e..2ce89ec 100644 --- a/packages/DApp/src/components/hooks/useCommunities.ts +++ b/packages/DApp/src/hooks/useCommunities.ts @@ -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([]) diff --git a/packages/DApp/src/components/hooks/useCommunity.ts b/packages/DApp/src/hooks/useCommunity.ts similarity index 84% rename from packages/DApp/src/components/hooks/useCommunity.ts rename to packages/DApp/src/hooks/useCommunity.ts index 17c8f08..4e6e965 100644 --- a/packages/DApp/src/components/hooks/useCommunity.ts +++ b/packages/DApp/src/hooks/useCommunity.ts @@ -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() diff --git a/packages/DApp/src/components/hooks/useContracts.ts b/packages/DApp/src/hooks/useContracts.ts similarity index 89% rename from packages/DApp/src/components/hooks/useContracts.ts rename to packages/DApp/src/hooks/useContracts.ts index c2010ca..7a06ad6 100644 --- a/packages/DApp/src/components/hooks/useContracts.ts +++ b/packages/DApp/src/hooks/useContracts.ts @@ -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' diff --git a/packages/DApp/src/components/hooks/useSendWakuVote.ts b/packages/DApp/src/hooks/useSendWakuVote.ts similarity index 79% rename from packages/DApp/src/components/hooks/useSendWakuVote.ts rename to packages/DApp/src/hooks/useSendWakuVote.ts index 01d7f44..9d526f9 100644 --- a/packages/DApp/src/components/hooks/useSendWakuVote.ts +++ b/packages/DApp/src/hooks/useSendWakuVote.ts @@ -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() diff --git a/packages/DApp/src/components/hooks/useVotesAggregate.ts b/packages/DApp/src/hooks/useVotesAggregate.ts similarity index 86% rename from packages/DApp/src/components/hooks/useVotesAggregate.ts rename to packages/DApp/src/hooks/useVotesAggregate.ts index d382f25..37b0219 100644 --- a/packages/DApp/src/components/hooks/useVotesAggregate.ts +++ b/packages/DApp/src/hooks/useVotesAggregate.ts @@ -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()