From f6adbecf57eac8978f7b28d296771b400fcb9701 Mon Sep 17 00:00:00 2001 From: Franck Date: Tue, 7 Dec 2021 12:39:00 +1100 Subject: [PATCH] Rename common react hooks --- packages/polling-components/package.json | 2 +- packages/polling-components/src/components/Poll.tsx | 4 ++-- packages/polling-components/src/components/PollCreation.tsx | 2 +- packages/polling-components/src/components/PollList.tsx | 2 +- packages/polling-components/src/components/PollResults.tsx | 2 +- packages/polling-example/package.json | 2 +- packages/polling-example/src/components/WakuPolling.tsx | 4 ++-- packages/polling-example/src/index.tsx | 4 ++-- packages/react-components/package.json | 2 +- packages/voting-components/package.json | 2 +- packages/voting-components/src/components/Buttons.tsx | 2 +- .../voting-components/src/components/NotificationItem.tsx | 4 ++-- .../src/components/ProposalVoteCard/VoteChart.tsx | 2 +- .../src/components/VoteModal/VoteModal.tsx | 2 +- .../voting-components/src/components/VotingRoomCard.tsx | 4 ++-- .../voting-components/src/components/VotingRoomList.tsx | 2 +- .../src/components/VotingRoomListEmpty.tsx | 2 +- .../src/components/VotingRoomListHeader.tsx | 4 ++-- .../src/components/newVoteModal/NewVotingRoomModal.tsx | 2 +- .../src/components/newVoteModal/VotingRoomDetailInput.tsx | 2 +- packages/voting-example/package.json | 2 +- packages/voting-example/src/components/Voting.tsx | 6 +++--- packages/voting-example/src/components/VotingMobile.tsx | 2 +- packages/voting-example/src/index.tsx | 4 ++-- 24 files changed, 33 insertions(+), 33 deletions(-) diff --git a/packages/polling-components/package.json b/packages/polling-components/package.json index 9a59ebb..fba5e65 100644 --- a/packages/polling-components/package.json +++ b/packages/polling-components/package.json @@ -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" diff --git a/packages/polling-components/src/components/Poll.tsx b/packages/polling-components/src/components/Poll.tsx index 5b470f9..3ad6c79 100644 --- a/packages/polling-components/src/components/Poll.tsx +++ b/packages/polling-components/src/components/Poll.tsx @@ -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 diff --git a/packages/polling-components/src/components/PollCreation.tsx b/packages/polling-components/src/components/PollCreation.tsx index 12add8e..e2d822f 100644 --- a/packages/polling-components/src/components/PollCreation.tsx +++ b/packages/polling-components/src/components/PollCreation.tsx @@ -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 diff --git a/packages/polling-components/src/components/PollList.tsx b/packages/polling-components/src/components/PollList.tsx index 21d7b9a..b8f5337 100644 --- a/packages/polling-components/src/components/PollList.tsx +++ b/packages/polling-components/src/components/PollList.tsx @@ -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 diff --git a/packages/polling-components/src/components/PollResults.tsx b/packages/polling-components/src/components/PollResults.tsx index 982e18b..87849c8 100644 --- a/packages/polling-components/src/components/PollResults.tsx +++ b/packages/polling-components/src/components/PollResults.tsx @@ -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 diff --git a/packages/polling-example/package.json b/packages/polling-example/package.json index 8cc2148..f0dc332 100644 --- a/packages/polling-example/package.json +++ b/packages/polling-example/package.json @@ -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", diff --git a/packages/polling-example/src/components/WakuPolling.tsx b/packages/polling-example/src/components/WakuPolling.tsx index f5ca1d1..5e1907b 100644 --- a/packages/polling-example/src/components/WakuPolling.tsx +++ b/packages/polling-example/src/components/WakuPolling.tsx @@ -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 diff --git a/packages/polling-example/src/index.tsx b/packages/polling-example/src/index.tsx index aa005db..fd55ec7 100644 --- a/packages/polling-example/src/index.tsx +++ b/packages/polling-example/src/index.tsx @@ -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, diff --git a/packages/react-components/package.json b/packages/react-components/package.json index de0dad6..200d163 100644 --- a/packages/react-components/package.json +++ b/packages/react-components/package.json @@ -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", diff --git a/packages/voting-components/package.json b/packages/voting-components/package.json index 04b6f01..be2a90e 100644 --- a/packages/voting-components/package.json +++ b/packages/voting-components/package.json @@ -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", diff --git a/packages/voting-components/src/components/Buttons.tsx b/packages/voting-components/src/components/Buttons.tsx index de0bb12..5b29967 100644 --- a/packages/voting-components/src/components/Buttons.tsx +++ b/packages/voting-components/src/components/Buttons.tsx @@ -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)` diff --git a/packages/voting-components/src/components/NotificationItem.tsx b/packages/voting-components/src/components/NotificationItem.tsx index f8852d6..0875dce 100644 --- a/packages/voting-components/src/components/NotificationItem.tsx +++ b/packages/voting-components/src/components/NotificationItem.tsx @@ -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' diff --git a/packages/voting-components/src/components/ProposalVoteCard/VoteChart.tsx b/packages/voting-components/src/components/ProposalVoteCard/VoteChart.tsx index e8b125c..0c82198 100644 --- a/packages/voting-components/src/components/ProposalVoteCard/VoteChart.tsx +++ b/packages/voting-components/src/components/ProposalVoteCard/VoteChart.tsx @@ -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' diff --git a/packages/voting-components/src/components/VoteModal/VoteModal.tsx b/packages/voting-components/src/components/VoteModal/VoteModal.tsx index 24ba3c5..b55df4c 100644 --- a/packages/voting-components/src/components/VoteModal/VoteModal.tsx +++ b/packages/voting-components/src/components/VoteModal/VoteModal.tsx @@ -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' diff --git a/packages/voting-components/src/components/VotingRoomCard.tsx b/packages/voting-components/src/components/VotingRoomCard.tsx index f668c0e..05de115 100644 --- a/packages/voting-components/src/components/VotingRoomCard.tsx +++ b/packages/voting-components/src/components/VotingRoomCard.tsx @@ -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 { diff --git a/packages/voting-components/src/components/VotingRoomList.tsx b/packages/voting-components/src/components/VotingRoomList.tsx index 0c3233d..243d6f2 100644 --- a/packages/voting-components/src/components/VotingRoomList.tsx +++ b/packages/voting-components/src/components/VotingRoomList.tsx @@ -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' diff --git a/packages/voting-components/src/components/VotingRoomListEmpty.tsx b/packages/voting-components/src/components/VotingRoomListEmpty.tsx index f8e8d83..b8b93d5 100644 --- a/packages/voting-components/src/components/VotingRoomListEmpty.tsx +++ b/packages/voting-components/src/components/VotingRoomListEmpty.tsx @@ -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 diff --git a/packages/voting-components/src/components/VotingRoomListHeader.tsx b/packages/voting-components/src/components/VotingRoomListHeader.tsx index dd85565..1a34ef4 100644 --- a/packages/voting-components/src/components/VotingRoomListHeader.tsx +++ b/packages/voting-components/src/components/VotingRoomListHeader.tsx @@ -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 diff --git a/packages/voting-components/src/components/newVoteModal/NewVotingRoomModal.tsx b/packages/voting-components/src/components/newVoteModal/NewVotingRoomModal.tsx index db6407e..621e9b3 100644 --- a/packages/voting-components/src/components/newVoteModal/NewVotingRoomModal.tsx +++ b/packages/voting-components/src/components/newVoteModal/NewVotingRoomModal.tsx @@ -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' diff --git a/packages/voting-components/src/components/newVoteModal/VotingRoomDetailInput.tsx b/packages/voting-components/src/components/newVoteModal/VotingRoomDetailInput.tsx index e7299fe..0840226 100644 --- a/packages/voting-components/src/components/newVoteModal/VotingRoomDetailInput.tsx +++ b/packages/voting-components/src/components/newVoteModal/VotingRoomDetailInput.tsx @@ -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 { diff --git a/packages/voting-example/package.json b/packages/voting-example/package.json index e2ed6f0..8d6707e 100644 --- a/packages/voting-example/package.json +++ b/packages/voting-example/package.json @@ -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", diff --git a/packages/voting-example/src/components/Voting.tsx b/packages/voting-example/src/components/Voting.tsx index 6f993cb..2b824f7 100644 --- a/packages/voting-example/src/components/Voting.tsx +++ b/packages/voting-example/src/components/Voting.tsx @@ -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' diff --git a/packages/voting-example/src/components/VotingMobile.tsx b/packages/voting-example/src/components/VotingMobile.tsx index 2ec45bb..d76d8a3 100644 --- a/packages/voting-example/src/components/VotingMobile.tsx +++ b/packages/voting-example/src/components/VotingMobile.tsx @@ -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 diff --git a/packages/voting-example/src/index.tsx b/packages/voting-example/src/index.tsx index d7b3b10..04324b8 100644 --- a/packages/voting-example/src/index.tsx +++ b/packages/voting-example/src/index.tsx @@ -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'