Rename common react hooks
This commit is contained in:
parent
a6d03613fd
commit
f6adbecf57
|
@ -34,7 +34,7 @@
|
|||
"dependencies": {
|
||||
"@dappconnect/vote-poll-sdk-core": "^0.1.0",
|
||||
"@dappconnect/poll-sdk-react-hooks": "^0.1.0",
|
||||
"@status-waku-voting/react-components": "^0.1.0",
|
||||
"@dappconnect/vote-poll-sdk-react-components": "^0.1.0",
|
||||
"ethers": "^5.4.4",
|
||||
"react": "^17.0.2",
|
||||
"styled-components": "^5.3.0"
|
||||
|
|
|
@ -4,9 +4,9 @@ import { BigNumber } from 'ethers'
|
|||
import React, { useEffect, useState } from 'react'
|
||||
import { PollType } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||
import styled from 'styled-components'
|
||||
import { RadioGroup, SmallButton, Theme } from '@status-waku-voting/react-components'
|
||||
import { RadioGroup, SmallButton, Theme } from '@dappconnect/vote-poll-sdk-react-components'
|
||||
import { PollResults } from './PollResults'
|
||||
import { Modal } from '@status-waku-voting/react-components'
|
||||
import { Modal } from '@dappconnect/vote-poll-sdk-react-components'
|
||||
|
||||
type PollProps = {
|
||||
theme: Theme
|
||||
|
|
|
@ -2,7 +2,7 @@ import React, { ReactNode, useState } from 'react'
|
|||
import styled from 'styled-components'
|
||||
import { PollType } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||
import { WakuPolling } from '@dappconnect/vote-poll-sdk-core'
|
||||
import { Input, addIcon, SmallButton, Modal, Theme } from '@status-waku-voting/react-components'
|
||||
import { Input, addIcon, SmallButton, Modal, Theme } from '@dappconnect/vote-poll-sdk-react-components'
|
||||
|
||||
function getLocaleIsoTime(dateTime: Date) {
|
||||
const MS_PER_MINUTE = 60000
|
||||
|
|
|
@ -3,7 +3,7 @@ import { DetailedTimedPoll } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/
|
|||
import React, { useEffect, useState } from 'react'
|
||||
import { Poll } from './Poll'
|
||||
import styled from 'styled-components'
|
||||
import { Theme } from '@status-waku-voting/react-components'
|
||||
import { Theme } from '@dappconnect/vote-poll-sdk-react-components'
|
||||
import { usePollList } from '@dappconnect/poll-sdk-react-hooks'
|
||||
type PollListProps = {
|
||||
theme: Theme
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react'
|
||||
import { DetailedTimedPoll } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/models/DetailedTimedPoll'
|
||||
import styled from 'styled-components'
|
||||
import { colorRouletteGenerator, checkCircleIcon } from '@status-waku-voting/react-components'
|
||||
import { colorRouletteGenerator, checkCircleIcon } from '@dappconnect/vote-poll-sdk-react-components'
|
||||
|
||||
type PollResultsProps = {
|
||||
poll: DetailedTimedPoll
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
"@dappconnect/vote-poll-sdk-core": "^0.1.0",
|
||||
"@dappconnect/poll-sdk-react-components": "^0.1.0",
|
||||
"@dappconnect/poll-sdk-react-hooks": "^0.1.0",
|
||||
"@status-waku-voting/react-components": "^0.1.0",
|
||||
"@dappconnect/vote-poll-sdk-react-components": "^0.1.0",
|
||||
"@usedapp/core": "^0.4.7",
|
||||
"ethers": "^5.4.4",
|
||||
"react": "^17.0.2",
|
||||
|
|
|
@ -5,8 +5,8 @@ import styled from 'styled-components'
|
|||
import { PollList, PollCreation } from '@dappconnect/poll-sdk-react-components'
|
||||
import { JsonRpcSigner } from '@ethersproject/providers'
|
||||
import { useWakuPolling } from '@dappconnect/poll-sdk-react-hooks'
|
||||
import { Modal, Networks, CreateButton } from '@status-waku-voting/react-components'
|
||||
import { Theme } from '@status-waku-voting/react-components/dist/esm/src/style/themes'
|
||||
import { Modal, Networks, CreateButton } from '@dappconnect/vote-poll-sdk-react-components'
|
||||
import { Theme } from '@dappconnect/vote-poll-sdk-react-components/dist/esm/src/style/themes'
|
||||
|
||||
type WakuPollingProps = {
|
||||
appName: string
|
||||
|
|
|
@ -3,10 +3,10 @@ import styled from 'styled-components'
|
|||
import { DAppProvider, ChainId, useEthers } from '@usedapp/core'
|
||||
import { DEFAULT_CONFIG } from '@usedapp/core/dist/cjs/src/model/config/default'
|
||||
import { WakuPolling } from './components/WakuPolling'
|
||||
import { TopBar, GlobalStyle } from '@status-waku-voting/react-components'
|
||||
import { TopBar, GlobalStyle } from '@dappconnect/vote-poll-sdk-react-components'
|
||||
import pollingIcon from './assets/images/pollingIcon.png'
|
||||
import { JsonRpcSigner } from '@ethersproject/providers'
|
||||
import { orangeTheme } from '@status-waku-voting/react-components/dist/esm/src/style/themes'
|
||||
import { orangeTheme } from '@dappconnect/vote-poll-sdk-react-components/dist/esm/src/style/themes'
|
||||
|
||||
const config = {
|
||||
readOnlyChainId: ChainId.Ropsten,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "@status-waku-voting/react-components",
|
||||
"name": "@dappconnect/vote-poll-sdk-react-components",
|
||||
"main": "dist/cjs/src/index.js",
|
||||
"module": "dist/esm/src/index.js",
|
||||
"types": "dist/esm/src/index.d.ts",
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
"dependencies": {
|
||||
"@dappconnect/vote-poll-sdk-core": "^0.1.0",
|
||||
"@status-waku-voting/voting-hooks": "^0.1.0",
|
||||
"@status-waku-voting/react-components": "^0.1.0",
|
||||
"@dappconnect/vote-poll-sdk-react-components": "^0.1.0",
|
||||
"ethers": "^5.4.4",
|
||||
"humanize-duration": "^3.27.0",
|
||||
"react": "^17.0.2",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Button } from '@status-waku-voting/react-components'
|
||||
import { Button } from '@dappconnect/vote-poll-sdk-react-components'
|
||||
import styled from 'styled-components'
|
||||
|
||||
export const Btn = styled(Button)`
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React, { useState } from 'react'
|
||||
import { blueTheme } from '@status-waku-voting/react-components/dist/esm/src/style/themes'
|
||||
import { CloseButton } from '@status-waku-voting/react-components/dist/esm/src/components/misc/Buttons'
|
||||
import { blueTheme } from '@dappconnect/vote-poll-sdk-react-components/dist/esm/src/style/themes'
|
||||
import { CloseButton } from '@dappconnect/vote-poll-sdk-react-components/dist/esm/src/components/misc/Buttons'
|
||||
import styled from 'styled-components'
|
||||
import { NotificationLink } from './ViewLink'
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import crossIcon from '../../assets/svg/cross.svg'
|
|||
import crossWinnerIcon from '../../assets/svg/crossWinner.svg'
|
||||
import checkIcon from '../../assets/svg/check.svg'
|
||||
import checkWinnerIcon from '../../assets/svg/checkWinner.svg'
|
||||
import { useMobileVersion } from '@status-waku-voting/react-components'
|
||||
import { useMobileVersion } from '@dappconnect/vote-poll-sdk-react-components'
|
||||
import { VotingRoom } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React, { useEffect, useMemo, useState } from 'react'
|
||||
import { VotingRoom } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||
import { Modal, Theme } from '@status-waku-voting/react-components'
|
||||
import { Modal, Theme } from '@dappconnect/vote-poll-sdk-react-components'
|
||||
import { AmountModal } from './AmountModal'
|
||||
import { ConfirmModal } from './ConfirmModal'
|
||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
import React, { ReactElement, useCallback, useState, useRef, useMemo } from 'react'
|
||||
import styled from 'styled-components'
|
||||
import { Theme } from '@status-waku-voting/react-components'
|
||||
import { Theme } from '@dappconnect/vote-poll-sdk-react-components'
|
||||
import { ProposalInfo } from './ProposalInfo'
|
||||
import { ProposalVote } from './ProposalVoteCard/ProposalVote'
|
||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
||||
import { useVotingRoom } from '@status-waku-voting/voting-hooks'
|
||||
import { VoteModal, VoteModalProps } from './VoteModal/VoteModal'
|
||||
import { useRefMobileVersion } from '@status-waku-voting/react-components'
|
||||
import { useRefMobileVersion } from '@dappconnect/vote-poll-sdk-react-components'
|
||||
import { VotingRoom } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||
|
||||
interface VotingRoomCardProps {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react'
|
||||
import styled from 'styled-components'
|
||||
import { Theme } from '@status-waku-voting/react-components'
|
||||
import { Theme } from '@dappconnect/vote-poll-sdk-react-components'
|
||||
import { VotingRoomCard } from './VotingRoomCard'
|
||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react'
|
||||
import styled from 'styled-components'
|
||||
import { CreateButton, Theme } from '@status-waku-voting/react-components'
|
||||
import { CreateButton, Theme } from '@dappconnect/vote-poll-sdk-react-components'
|
||||
|
||||
type VotingRoomListEmptyProps = {
|
||||
theme: Theme
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react'
|
||||
import styled from 'styled-components'
|
||||
import { CreateButton } from '@status-waku-voting/react-components'
|
||||
import { Theme } from '@status-waku-voting/react-components/dist/esm/src/style/themes'
|
||||
import { CreateButton } from '@dappconnect/vote-poll-sdk-react-components'
|
||||
import { Theme } from '@dappconnect/vote-poll-sdk-react-components/dist/esm/src/style/themes'
|
||||
|
||||
type VotingRoomListHeaderProps = {
|
||||
theme: Theme
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
||||
import { Modal, Theme } from '@status-waku-voting/react-components'
|
||||
import { Modal, Theme } from '@dappconnect/vote-poll-sdk-react-components'
|
||||
import React, { useEffect, useState } from 'react'
|
||||
import { VotingRoomDetailInput } from './VotingRoomDetailInput'
|
||||
import { TokenAmountScreen } from './TokenAmountScreen'
|
||||
|
|
|
@ -2,7 +2,7 @@ import React, { useMemo } from 'react'
|
|||
import styled from 'styled-components'
|
||||
import { ProposingBtn } from '../Buttons'
|
||||
import { TextArea } from '../Input'
|
||||
import { blueTheme } from '@status-waku-voting/react-components/dist/esm/src/style/themes'
|
||||
import { blueTheme } from '@dappconnect/vote-poll-sdk-react-components/dist/esm/src/style/themes'
|
||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
||||
|
||||
interface VotingRoomDetailInputProps {
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
"@dappconnect/vote-poll-sdk-core": "^0.1.0",
|
||||
"@status-waku-voting/voting-components": "^0.1.0",
|
||||
"@status-waku-voting/voting-hooks": "^0.1.0",
|
||||
"@status-waku-voting/react-components": "^0.1.0",
|
||||
"@dappconnect/vote-poll-sdk-react-components": "^0.1.0",
|
||||
"@usedapp/core": "^0.4.7",
|
||||
"ethers": "^5.4.4",
|
||||
"react": "^17.0.2",
|
||||
|
|
|
@ -6,11 +6,11 @@ import {
|
|||
VotingRoomListEmpty,
|
||||
NewVotingRoomModal,
|
||||
} from '@status-waku-voting/voting-components'
|
||||
import { blueTheme } from '@status-waku-voting/react-components/dist/esm/src/style/themes'
|
||||
import { blueTheme } from '@dappconnect/vote-poll-sdk-react-components/dist/esm/src/style/themes'
|
||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
||||
import { useTokenBalance } from '@status-waku-voting/react-components'
|
||||
import { useTokenBalance } from '@dappconnect/vote-poll-sdk-react-components'
|
||||
import { useEthers } from '@usedapp/core'
|
||||
import { Modal, Networks, useMobileVersion, Theme } from '@status-waku-voting/react-components'
|
||||
import { Modal, Networks, useMobileVersion, Theme } from '@dappconnect/vote-poll-sdk-react-components'
|
||||
import { useVotingRoomsId } from '@status-waku-voting/voting-hooks'
|
||||
import { VotingRoom } from '@dappconnect/vote-poll-sdk-core/dist/esm/src/types/PollType'
|
||||
import { useHistory } from 'react-router'
|
||||
|
|
|
@ -5,7 +5,7 @@ import styled from 'styled-components'
|
|||
import { VotingRoomMobile, NewVotingRoomMobile } from '@status-waku-voting/voting-components'
|
||||
import { Voting } from './Voting'
|
||||
import { WakuVoting } from '@dappconnect/vote-poll-sdk-core'
|
||||
import { useTokenBalance } from '@status-waku-voting/react-components'
|
||||
import { useTokenBalance } from '@dappconnect/vote-poll-sdk-react-components'
|
||||
|
||||
type VotingRoomCreationProps = {
|
||||
tokenBalance: number
|
||||
|
|
|
@ -2,10 +2,10 @@ import React, { useRef } from 'react'
|
|||
import { useWakuVoting } from '@status-waku-voting/voting-hooks'
|
||||
import { VotingMobile } from './components/VotingMobile'
|
||||
import { Voting } from './components/Voting'
|
||||
import { TopBar, GlobalStyle, useMobileVersion } from '@status-waku-voting/react-components'
|
||||
import { TopBar, GlobalStyle, useMobileVersion } from '@dappconnect/vote-poll-sdk-react-components'
|
||||
import votingIcon from './assets/images/voting.png'
|
||||
import styled from 'styled-components'
|
||||
import { blueTheme } from '@status-waku-voting/react-components/dist/esm/src/style/themes'
|
||||
import { blueTheme } from '@dappconnect/vote-poll-sdk-react-components/dist/esm/src/style/themes'
|
||||
import { DAppProvider, ChainId, useEthers, useConfig } from '@usedapp/core'
|
||||
import { DEFAULT_CONFIG } from '@usedapp/core/dist/cjs/src/model/config/default'
|
||||
|
||||
|
|
Loading…
Reference in New Issue