From 55c4cc88dbfad43462b85983f1b0342e0f52b5f9 Mon Sep 17 00:00:00 2001 From: Nouman Tahir Date: Tue, 21 Feb 2023 12:35:05 +0500 Subject: [PATCH] rename upvote to upvotePopover --- src/components/comment/view/commentView.tsx | 2 +- src/components/index.tsx | 4 ++-- src/components/postsList/container/postsListContainer.tsx | 4 ++-- src/components/upvote/index.js | 4 ---- .../children/payoutDetailsContent.tsx | 2 +- .../{upvote => upvotePopover}/children/upvoteStyles.js | 0 .../container/upvotePopover.tsx} | 4 ++-- src/components/upvotePopover/index.js | 4 ++++ 8 files changed, 12 insertions(+), 12 deletions(-) delete mode 100644 src/components/upvote/index.js rename src/components/{upvote => upvotePopover}/children/payoutDetailsContent.tsx (99%) rename src/components/{upvote => upvotePopover}/children/upvoteStyles.js (100%) rename src/components/{upvote/container/upvoteContainer.tsx => upvotePopover/container/upvotePopover.tsx} (99%) create mode 100644 src/components/upvotePopover/index.js diff --git a/src/components/comment/view/commentView.tsx b/src/components/comment/view/commentView.tsx index 8858a6065..7c95d2671 100644 --- a/src/components/comment/view/commentView.tsx +++ b/src/components/comment/view/commentView.tsx @@ -11,7 +11,7 @@ import { delay } from '../../../utils/editor'; // Components import { CommentBody, PostHeaderDescription } from '../../postElements'; -import { Upvote } from '../../upvote'; +import { Upvote } from '../../upvotePopover'; import { IconButton } from '../../iconButton'; import { TextWithIcon } from '../../basicUIElements'; diff --git a/src/components/index.tsx b/src/components/index.tsx index f0bdd90d3..b15916d3d 100644 --- a/src/components/index.tsx +++ b/src/components/index.tsx @@ -57,7 +57,7 @@ import { TextInput } from './textInput'; import { ToastNotification } from './toastNotification'; import { ToggleSwitch } from './toggleSwitch'; import { TransferFormItem } from './transferFormItem'; -import { Upvote } from './upvote'; +import { UpvotePopover } from './upvotePopover'; import { UserAvatar } from './userAvatar'; import Logo from './logo/logo'; @@ -221,7 +221,7 @@ export { ToggleSwitch, Transaction, TransferFormItem, - Upvote, + UpvotePopover, UserAvatar, UserListItem, VotersDisplay, diff --git a/src/components/postsList/container/postsListContainer.tsx b/src/components/postsList/container/postsListContainer.tsx index 28501ba98..a5e6aed2c 100644 --- a/src/components/postsList/container/postsListContainer.tsx +++ b/src/components/postsList/container/postsListContainer.tsx @@ -7,7 +7,7 @@ import { useNavigation } from '@react-navigation/native'; import ROUTES from '../../../constants/routeNames'; import { useIntl } from 'react-intl'; import Popover from 'react-native-modal-popover'; -import Upvote from '../../upvote'; +import { UpvotePopover } from '../..'; import { PostTypes } from '../../../constants/postTypes'; import { PostOptionsModal } from '../../postOptionsModal'; @@ -284,7 +284,7 @@ const postsListContainer = ( } {...props} /> - diff --git a/src/components/upvote/index.js b/src/components/upvote/index.js deleted file mode 100644 index 1c4544c95..000000000 --- a/src/components/upvote/index.js +++ /dev/null @@ -1,4 +0,0 @@ -import Upvote from './container/upvoteContainer'; - -export { Upvote }; -export default Upvote; diff --git a/src/components/upvote/children/payoutDetailsContent.tsx b/src/components/upvotePopover/children/payoutDetailsContent.tsx similarity index 99% rename from src/components/upvote/children/payoutDetailsContent.tsx rename to src/components/upvotePopover/children/payoutDetailsContent.tsx index 5841bedd9..1122c2f9e 100644 --- a/src/components/upvote/children/payoutDetailsContent.tsx +++ b/src/components/upvotePopover/children/payoutDetailsContent.tsx @@ -9,7 +9,7 @@ import { getTimeFromNow } from '../../../utils/time'; import { FormattedCurrency } from '../../formatedElements'; // Styles -import styles from '../children/upvoteStyles'; +import styles from './upvoteStyles'; interface Props { diff --git a/src/components/upvote/children/upvoteStyles.js b/src/components/upvotePopover/children/upvoteStyles.js similarity index 100% rename from src/components/upvote/children/upvoteStyles.js rename to src/components/upvotePopover/children/upvoteStyles.js diff --git a/src/components/upvote/container/upvoteContainer.tsx b/src/components/upvotePopover/container/upvotePopover.tsx similarity index 99% rename from src/components/upvote/container/upvoteContainer.tsx rename to src/components/upvotePopover/container/upvotePopover.tsx index 9e9efb819..2b43ed003 100644 --- a/src/components/upvote/container/upvoteContainer.tsx +++ b/src/components/upvotePopover/container/upvotePopover.tsx @@ -54,7 +54,7 @@ interface Props { * */ -const UpvoteContainer = forwardRef(({ parentType }: Props, ref) => { +const UpvotePopover = forwardRef(({ parentType }: Props, ref) => { const intl = useIntl(); const dispatch = useAppDispatch(); @@ -409,4 +409,4 @@ const UpvoteContainer = forwardRef(({ parentType }: Props, ref) => { ); }); -export default UpvoteContainer; +export default UpvotePopover; diff --git a/src/components/upvotePopover/index.js b/src/components/upvotePopover/index.js new file mode 100644 index 000000000..e0ef20059 --- /dev/null +++ b/src/components/upvotePopover/index.js @@ -0,0 +1,4 @@ +import UpvotePopover from './container/upvotePopover'; + +export { UpvotePopover }; +export default UpvotePopover;