From e74ebea9140056bb1056ce231306ed9eb6de5773 Mon Sep 17 00:00:00 2001 From: Mustafa Buyukcelebi Date: Mon, 2 Dec 2019 17:25:03 +0300 Subject: [PATCH 01/15] Fix for editor selection issue From 5263c4b9883e68a54198fb0c2147fe8849d92bf0 Mon Sep 17 00:00:00 2001 From: Mustafa Buyukcelebi Date: Mon, 2 Dec 2019 17:39:49 +0300 Subject: [PATCH 02/15] Fix for editor selection issue --- .eslintrc.js | 4 ---- .eslintrc.json | 5 +++-- .../markdownEditor/view/markdownEditorView.js | 10 +++++----- 3 files changed, 8 insertions(+), 11 deletions(-) delete mode 100644 .eslintrc.js diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 40c6dcd05..000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - root: true, - extends: '@react-native-community', -}; diff --git a/.eslintrc.json b/.eslintrc.json index 6444a3273..58ca64ea7 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -7,7 +7,8 @@ "plugin:eslint-comments/recommended", "plugin:import/errors", "plugin:import/warnings", - "plugin:jest/recommended" + "plugin:jest/recommended", + "@react-native-community" ], "env": { "browser": true, @@ -46,7 +47,7 @@ "no-case-declarations": "off", "no-cycle": "off", "react-hooks/rules-of-hooks": "error", - "react-hooks/exhaustive-deps": "warn", + "react-hooks/exhaustive-deps": "off", "import/no-extraneous-dependencies": [ "error", { diff --git a/src/components/markdownEditor/view/markdownEditorView.js b/src/components/markdownEditor/view/markdownEditorView.js index 9c9dbe29e..a798cf199 100644 --- a/src/components/markdownEditor/view/markdownEditorView.js +++ b/src/components/markdownEditor/view/markdownEditorView.js @@ -45,13 +45,13 @@ const MarkdownEditorView = ({ if (!isPreviewActive) { _setTextAndSelection({ selection: { start: 0, end: 0 }, text }); } - }, [_setTextAndSelection, isPreviewActive, text]); + }, [isPreviewActive]); useEffect(() => { if (text === '' && draftBody !== '') { _setTextAndSelection({ selection: { start: 0, end: 0 }, text: draftBody }); } - }, [_setTextAndSelection, draftBody, text]); + }, [draftBody]); useEffect(() => { if (editable === null) { @@ -63,7 +63,7 @@ const MarkdownEditorView = ({ } else { setEditable(!isLoading); } - }, [editable, isLoading]); + }, [isLoading]); useEffect(() => { if (uploadedImage && uploadedImage.url) { @@ -75,7 +75,7 @@ const MarkdownEditorView = ({ isImage: !!uploadedImage, }); } - }, [_setTextAndSelection, selection, text, uploadedImage]); + }, [uploadedImage]); useEffect(() => { setText(draftBody); @@ -91,7 +91,7 @@ const MarkdownEditorView = ({ handleIsFormValid(text); } } - }, [_changeText, handleIsFormValid, text]); + }, [text]); // eslint-disable-next-line react-hooks/exhaustive-deps const _changeText = useCallback(input => { From 57588fa9a9fc8796b7473e1182b13b12b342237d Mon Sep 17 00:00:00 2001 From: Mustafa Buyukcelebi Date: Mon, 2 Dec 2019 23:03:34 +0300 Subject: [PATCH 03/15] Fixed search result tag issue --- src/components/posts/view/postsView.js | 15 ++++----------- src/constants/options/filters.js | 3 +++ .../searchResult/screen/searchResultScreen.js | 8 ++++---- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/src/components/posts/view/postsView.js b/src/components/posts/view/postsView.js index 8dd98c903..632a925a4 100644 --- a/src/components/posts/view/postsView.js +++ b/src/components/posts/view/postsView.js @@ -162,19 +162,12 @@ const PostsView = ({ setIsLoading(true); const filter = type || selectedFilterValue; - let options; const limit = 3; - if (filter === 'feed' || filter === 'blog' || getFor === 'blog' || filter === 'reblogs') { - options = { - tag, - limit, - }; - } else { - options = { - limit, - }; - } + const options = { + tag, + limit, + }; if (startAuthor && startPermlink && !refreshing) { options.start_author = startAuthor; diff --git a/src/constants/options/filters.js b/src/constants/options/filters.js index 8189b7fef..6dfe4de3a 100644 --- a/src/constants/options/filters.js +++ b/src/constants/options/filters.js @@ -1,6 +1,9 @@ export const POPULAR_FILTERS = ['FEED', 'TOP', 'HOT', 'NEW']; export const POPULAR_FILTERS_VALUE = ['feed', 'trending', 'hot', 'created']; +export const GLOBAL_POST_FILTERS = ['TOP', 'HOT', 'NEW']; +export const GLOBAL_POST_FILTERS_VALUE = ['trending', 'hot', 'created']; + export const PROFILE_FILTERS = ['BLOG', 'FEED']; export const PROFILE_FILTERS_VALUE = ['blog', 'feed']; diff --git a/src/screens/searchResult/screen/searchResultScreen.js b/src/screens/searchResult/screen/searchResultScreen.js index 04d0682b2..567a12c6c 100644 --- a/src/screens/searchResult/screen/searchResultScreen.js +++ b/src/screens/searchResult/screen/searchResultScreen.js @@ -10,7 +10,7 @@ import { SearchInput, Posts, TabBar } from '../../../components'; import styles from './searchResultStyles'; import globalStyles from '../../../globalStyles'; -import { POPULAR_FILTERS, POPULAR_FILTERS_VALUE } from '../../../constants/options/filters'; +import { GLOBAL_POST_FILTERS, GLOBAL_POST_FILTERS_VALUE } from '../../../constants/options/filters'; const SearchResultScreen = ({ navigation }) => { const tag = navigation.getParam('tag', ''); @@ -33,7 +33,7 @@ const SearchResultScreen = ({ navigation }) => { const _getSelectedIndex = () => { if (filter) { - const selectedIndex = POPULAR_FILTERS_VALUE.indexOf(filter); + const selectedIndex = GLOBAL_POST_FILTERS_VALUE.indexOf(filter); if (selectedIndex > 0) { return selectedIndex; } @@ -54,8 +54,8 @@ const SearchResultScreen = ({ navigation }) => { From e4f09e391463d90dbe0b42f2d00513020c672097 Mon Sep 17 00:00:00 2001 From: Mustafa Buyukcelebi Date: Mon, 2 Dec 2019 23:29:58 +0300 Subject: [PATCH 04/15] Fixed search result tag issue --- .../posts/container/postsContainer.js | 2 ++ src/components/posts/view/postsView.js | 17 +++++++++++++---- src/components/profile/profileView.js | 2 +- src/screens/feed/screen/feedScreen.js | 2 +- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/components/posts/container/postsContainer.js b/src/components/posts/container/postsContainer.js index 638a44b70..9221385c5 100644 --- a/src/components/posts/container/postsContainer.js +++ b/src/components/posts/container/postsContainer.js @@ -25,6 +25,7 @@ const PostsContainer = ({ tag, nsfw, filterOptionsValue, + feedUsername, }) => { const dispatch = useDispatch(); @@ -59,6 +60,7 @@ const PostsContainer = ({ setFeedPosts={_setFeedPosts} tag={tag} filterOptionsValue={filterOptionsValue} + feedUsername={feedUsername} /> )} diff --git a/src/components/posts/view/postsView.js b/src/components/posts/view/postsView.js index 632a925a4..4ba6af774 100644 --- a/src/components/posts/view/postsView.js +++ b/src/components/posts/view/postsView.js @@ -39,6 +39,7 @@ const PostsView = ({ changeForceLoadPostState, forceLoadPost, filterOptionsValue, + feedUsername, }) => { const [posts, setPosts] = useState(isConnected ? [] : feedPosts); const [startAuthor, setStartAuthor] = useState(''); @@ -162,12 +163,20 @@ const PostsView = ({ setIsLoading(true); const filter = type || selectedFilterValue; + let options; const limit = 3; - const options = { - tag, - limit, - }; + if (filter === 'feed' || filter === 'blog' || getFor === 'blog' || filter === 'reblogs') { + options = { + tag: feedUsername, + limit, + }; + } else { + options = { + tag, + limit, + }; + } if (startAuthor && startPermlink && !refreshing) { options.start_author = startAuthor; diff --git a/src/components/profile/profileView.js b/src/components/profile/profileView.js index fb75b8c36..b61780202 100644 --- a/src/components/profile/profileView.js +++ b/src/components/profile/profileView.js @@ -177,7 +177,7 @@ class ProfileView extends PureComponent { selectedOptionIndex={0} pageType="profiles" getFor="blog" - tag={username} + feedUsername={username} key={username} handleOnScroll={isSummaryOpen ? this._handleOnScroll : null} forceLoadPost={forceLoadPost} diff --git a/src/screens/feed/screen/feedScreen.js b/src/screens/feed/screen/feedScreen.js index 358743b6d..c7f95dd43 100644 --- a/src/screens/feed/screen/feedScreen.js +++ b/src/screens/feed/screen/feedScreen.js @@ -25,7 +25,7 @@ const FeedScreen = () => { filterOptionsValue={[...POPULAR_FILTERS_VALUE]} getFor={isLoggedIn ? 'feed' : 'trending'} selectedOptionIndex={isLoggedIn ? 0 : 2} - tag={get(currentAccount, 'name')} + feedUsername={get(currentAccount, 'name')} /> From 5761039f9763dc20fb2a281ab84fdf5075db8ca0 Mon Sep 17 00:00:00 2001 From: feruz Date: Tue, 3 Dec 2019 13:28:53 +0200 Subject: [PATCH 05/15] tag autolower --- .eslintrc.json | 8 +++ package.json | 2 +- src/components/bottomTabBar/view/tabbar.js | 10 +-- .../formattedCurrencyView.js | 6 +- src/components/index.js | 6 +- src/components/postBoost/postBoostView.js | 8 +-- src/components/promote/promoteView.js | 8 +-- .../container/searchModalContainer.js | 2 +- .../sideMenu/container/sideMenuContainer.js | 16 ++--- src/components/sideMenu/view/sideMenuView.js | 26 +++---- src/components/spinGame/spinGameView.js | 8 ++- src/components/upvote/view/upvoteView.js | 38 +++++------ .../userAvatar/view/userAvatarView.js | 2 +- .../walletHeader/view/walletHeaderView.js | 4 +- src/containers/profileContainer.js | 60 ++++++++--------- src/containers/steemWalletContainer.js | 8 +-- src/providers/esteem/esteem.js | 4 +- src/providers/steem/dsteem.js | 1 + .../container/applicationContainer.js | 67 ++++++++++--------- src/screens/drafts/screen/draftsScreen.js | 1 + .../editor/container/editorContainer.js | 2 +- src/screens/editor/screen/editorScreen.js | 3 +- .../container/notificationContainer.js | 28 ++++---- src/screens/pinCode/screen/pinCodeScreen.js | 3 +- src/screens/post/container/postContainer.js | 22 +++--- src/screens/settings/screen/settingsScreen.js | 1 + src/screens/transfer/screen/delegateScreen.js | 1 + src/screens/transfer/screen/transferScreen.js | 2 +- src/utils/dsteemUtils.js | 3 +- src/utils/filterNsfwPost.js | 2 + src/utils/postParser.js | 1 + src/utils/vote.js | 2 +- src/utils/wallet.js | 4 +- yarn.lock | 8 +-- 34 files changed, 189 insertions(+), 178 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 58ca64ea7..3e9fc02bf 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -48,11 +48,19 @@ "no-cycle": "off", "react-hooks/rules-of-hooks": "error", "react-hooks/exhaustive-deps": "off", + "react/destructuring-assignment": [1, "always"], "import/no-extraneous-dependencies": [ "error", { "devDependencies": true } ] + }, + "settings": { + "import/resolver": { + "node": { + "extensions": [".js", ".jsx"] + } + } } } diff --git a/package.json b/package.json index b5750a5e2..03ecbcbb8 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "react-native-navigation-bar-color": "^0.1.0", "react-native-reanimated": "^1.3.0", "react-native-render-html": "^4.1.2", - "react-native-screens": "^2.0.0-alpha.15", + "react-native-screens": "^2.0.0-alpha.16", "react-native-scrollable-tab-view": "esteemapp/react-native-scrollable-tab-view", "react-native-slider": "^0.11.0", "react-native-snap-carousel": "^3.8.0", diff --git a/src/components/bottomTabBar/view/tabbar.js b/src/components/bottomTabBar/view/tabbar.js index ccb63de69..5b8f1ee27 100644 --- a/src/components/bottomTabBar/view/tabbar.js +++ b/src/components/bottomTabBar/view/tabbar.js @@ -2,11 +2,11 @@ import { View, TouchableHighlight, Animated } from 'react-native'; import React, { Component } from 'react'; import Svg, { Circle, Path } from 'react-native-svg'; +import styles from './bottomTabBarStyles'; + const AnimatedCircle = Animated.createAnimatedComponent(Circle); const AnimatedPath = Animated.createAnimatedComponent(Path); -import styles from './bottomTabBarStyles'; - export default class TabBar extends Component { constructor(props) { super(props); @@ -32,7 +32,7 @@ export default class TabBar extends Component { } this.state = { - selectedIndex: selectedIndex, + selectedIndex, circleRadius: new Animated.Value(91 + selectedIndex * value), pathD: new Animated.Value(selectedIndex * value), pathX: selectedIndex * value, @@ -142,7 +142,7 @@ const TabBarItem = ({ icon, selectedIcon, index, selected, onPress, showIcon, di if (selected) { if (showIcon) { return ( - + {selectedIcon || icon} ); @@ -153,7 +153,7 @@ const TabBarItem = ({ icon, selectedIcon, index, selected, onPress, showIcon, di return ( onPress(index, disabled)} > diff --git a/src/components/formatedElements/formattedCurrency/formattedCurrencyView.js b/src/components/formatedElements/formattedCurrency/formattedCurrencyView.js index da56c4a72..11128eb63 100644 --- a/src/components/formatedElements/formattedCurrency/formattedCurrencyView.js +++ b/src/components/formatedElements/formattedCurrency/formattedCurrencyView.js @@ -7,9 +7,9 @@ const FormattedCurrency = ({ value, fixAt = 3, currency, isApproximate = false } const toFixedValue = valueInCurrency.toFixed(fixAt); return ( - {`${ - isApproximate ? '~' : '' - }${currencySymbol} ${toFixedValue}`} + + {`${isApproximate ? '~' : ''}${currencySymbol} ${toFixedValue}`} + ); }; diff --git a/src/components/index.js b/src/components/index.js index a4002f7c9..95e61eae2 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -1,6 +1,6 @@ import { AvatarHeader } from './avatarHeader'; import { BasicHeader } from './basicHeader'; -import { BoostIndicatorAnimation } from './animations'; +import { BoostIndicatorAnimation, PulseAnimation, SpinIndicator } from './animations'; import { BottomTabBar } from './bottomTabBar'; import { CheckBox } from './checkbox'; import { CircularButton, TextButton, SquareButton } from './buttons'; @@ -32,12 +32,12 @@ import { PostForm } from './postForm'; import { PostHeaderDescription, PostBody, Tags } from './postElements'; import { PostListItem } from './postListItem'; import { ProfileSummary } from './profileSummary'; -import { PulseAnimation } from './animations'; + import { SearchInput } from './searchInput'; import { SearchModal } from './searchModal'; import { SettingsItem } from './settingsItem'; import { SideMenu } from './sideMenu'; -import { SpinIndicator } from './animations'; + import { SummaryArea, TagArea, TextArea, TitleArea } from './editorElements'; import { TabBar } from './tabBar'; import { TextInput } from './textInput'; diff --git a/src/components/postBoost/postBoostView.js b/src/components/postBoost/postBoostView.js index e2b611075..eb085b326 100644 --- a/src/components/postBoost/postBoostView.js +++ b/src/components/postBoost/postBoostView.js @@ -145,11 +145,9 @@ class BoostPostScreen extends PureComponent { {`${balance || _balance} ESTM`} - { - - {intl.formatMessage({ id: 'promote.permlink' })} - - } + + {intl.formatMessage({ id: 'promote.permlink' })} + - { - - {intl.formatMessage({ id: 'promote.permlink' })} - - } + + {intl.formatMessage({ id: 'promote.permlink' })} + 0) { - result.image = metadata.image[0]; + [result.image] = metadata.image; } else { result.image = getResizedAvatar(author); } diff --git a/src/components/sideMenu/container/sideMenuContainer.js b/src/components/sideMenu/container/sideMenuContainer.js index 7b6f85dcd..43679985e 100644 --- a/src/components/sideMenu/container/sideMenuContainer.js +++ b/src/components/sideMenu/container/sideMenuContainer.js @@ -30,14 +30,6 @@ class SideMenuContainer extends Component { // Component Life Cycle Functions - UNSAFE_componentWillReceiveProps(nextProps) { - const { isLoggedIn } = this.props; - - if (isLoggedIn) { - this._createUserList(nextProps.otherAccounts); - } - } - _createUserList = otherAccounts => { const { currentAccount } = this.props; @@ -92,6 +84,14 @@ class SideMenuContainer extends Component { dispatch(logout()); }; + UNSAFE_componentWillReceiveProps(nextProps) { + const { isLoggedIn } = this.props; + + if (isLoggedIn) { + this._createUserList(nextProps.otherAccounts); + } + } + render() { const { currentAccount, isLoggedIn } = this.props; const { accounts } = this.state; diff --git a/src/components/sideMenu/view/sideMenuView.js b/src/components/sideMenu/view/sideMenuView.js index b867e0050..55bbac04c 100644 --- a/src/components/sideMenu/view/sideMenuView.js +++ b/src/components/sideMenu/view/sideMenuView.js @@ -42,19 +42,6 @@ class SideMenuView extends Component { }); } - UNSAFE_componentWillReceiveProps(nextProps) { - const { isLoggedIn, accounts } = this.props; - const { isAddAccountIconActive } = this.state; - - if (isLoggedIn !== nextProps.isLoggedIn) { - this._setMenuItems(nextProps.isLoggedIn); - } - - if (accounts !== nextProps.accounts && isAddAccountIconActive) { - this.setState({ menuItems: nextProps.accounts }); - } - } - // Component Functions _handleOnPressAddAccountIcon = () => { @@ -91,6 +78,19 @@ class SideMenuView extends Component { } }; + UNSAFE_componentWillReceiveProps(nextProps) { + const { isLoggedIn, accounts } = this.props; + const { isAddAccountIconActive } = this.state; + + if (isLoggedIn !== nextProps.isLoggedIn) { + this._setMenuItems(nextProps.isLoggedIn); + } + + if (accounts !== nextProps.accounts && isAddAccountIconActive) { + this.setState({ menuItems: nextProps.accounts }); + } + } + render() { const { currentAccount, isLoggedIn, intl, handleLogout } = this.props; const { menuItems, isAddAccountIconActive, storageT } = this.state; diff --git a/src/components/spinGame/spinGameView.js b/src/components/spinGame/spinGameView.js index 065b2896b..2b09606b9 100644 --- a/src/components/spinGame/spinGameView.js +++ b/src/components/spinGame/spinGameView.js @@ -82,9 +82,11 @@ const SpinGameView = ({ handleOnButtonPress={id => buyItem(id)} /> ))} - {`${intl.formatMessage({ - id: 'free_estm.timer_text', - })} ${moment.utc(moment(nextDate).diff(new Date())).format('H:m')}`} + + {`${intl.formatMessage({ + id: 'free_estm.timer_text', + })} ${moment.utc(moment(nextDate).diff(new Date())).format('H:m')}`} + )} diff --git a/src/components/upvote/view/upvoteView.js b/src/components/upvote/view/upvoteView.js index f15ac1080..9a1e1b8c6 100644 --- a/src/components/upvote/view/upvoteView.js +++ b/src/components/upvote/view/upvoteView.js @@ -48,24 +48,6 @@ class UpvoteView extends Component { this._calculateEstimatedAmount(); } - UNSAFE_componentWillReceiveProps(nextProps) { - const { isVoted, upvotePercent } = this.props; - const { isVoted: localIsVoted } = this.state; - - if (isVoted !== get(nextProps, 'isVoted') && localIsVoted !== get(nextProps, 'isVoted')) { - this.setState({ isVoted: get(nextProps, 'isVoted') }); - } - - if (upvotePercent !== get(nextProps, 'upvotePercent')) { - this.setState({ - sliderValue: - get(nextProps, 'isVoted', false) || - get(nextProps, 'isDownVoted', 1) || - get(nextProps, 'upvotePercent', 1), - }); - } - } - // Component Functions _calculateEstimatedAmount = async () => { const { currentAccount, globalProps } = this.props; @@ -187,6 +169,24 @@ class UpvoteView extends Component { }, 300); }; + UNSAFE_componentWillReceiveProps(nextProps) { + const { isVoted, upvotePercent } = this.props; + const { isVoted: localIsVoted } = this.state; + + if (isVoted !== get(nextProps, 'isVoted') && localIsVoted !== get(nextProps, 'isVoted')) { + this.setState({ isVoted: get(nextProps, 'isVoted') }); + } + + if (upvotePercent !== get(nextProps, 'upvotePercent')) { + this.setState({ + sliderValue: + get(nextProps, 'isVoted', false) || + get(nextProps, 'isDownVoted', 1) || + get(nextProps, 'upvotePercent', 1), + }); + } + } + render() { const { isDecinedPayout, @@ -204,7 +204,7 @@ class UpvoteView extends Component { const { isVoting, amount, sliderValue, isVoted, isShowDetails, downvote } = this.state; let iconName = 'upcircleo'; - let iconType = 'AntDesign'; + const iconType = 'AntDesign'; let downVoteIconName = 'downcircleo'; if (isVoted) { diff --git a/src/components/userAvatar/view/userAvatarView.js b/src/components/userAvatar/view/userAvatarView.js index 00320b86d..6669b9583 100644 --- a/src/components/userAvatar/view/userAvatarView.js +++ b/src/components/userAvatar/view/userAvatarView.js @@ -36,7 +36,7 @@ class UserAvatarView extends Component { const routeName = name === username ? ROUTES.TABBAR.PROFILE : ROUTES.SCREENS.PROFILE; navigate({ - routeName: routeName, + routeName, params: { username, }, diff --git a/src/components/walletHeader/view/walletHeaderView.js b/src/components/walletHeader/view/walletHeaderView.js index 8d099bfdb..ae9f80a95 100644 --- a/src/components/walletHeader/view/walletHeaderView.js +++ b/src/components/walletHeader/view/walletHeaderView.js @@ -81,9 +81,7 @@ const WalletHeaderView = ({ > - {unclaimedBalance - ? unclaimedBalance - : intl.formatMessage({ id: `wallet.${type}.buy` })} + {unclaimedBalance || intl.formatMessage({ id: `wallet.${type}.buy` })} diff --git a/src/containers/profileContainer.js b/src/containers/profileContainer.js index 7e9b077c7..abcddda00 100644 --- a/src/containers/profileContainer.js +++ b/src/containers/profileContainer.js @@ -76,36 +76,6 @@ class ProfileContainer extends Component { this._loadProfile(targetUsername); } - UNSAFE_componentWillReceiveProps(nextProps) { - if (!nextProps.isConnected) { - return; - } - - const { isLoggedIn, navigation } = this.props; - const { isOwnProfile } = this.state; - - if (isLoggedIn && !nextProps.isLoggedIn) { - navigation.navigate(ROUTES.SCREENS.LOGIN); - return; - } - - if (isOwnProfile) { - const { user } = this.state; - const { activeBottomTab, currentAccount } = this.props; - - const currentUsername = - get(currentAccount, 'name') !== get(nextProps, 'currentAccount.name') && - get(nextProps, 'currentAccount.name'); - const isActiveTabChanged = - activeBottomTab !== get(nextProps, 'activeBottomTab') && - get(nextProps, 'activeBottomTab') === ROUTES.TABBAR.PROFILE; - - if ((isActiveTabChanged && user) || currentUsername) { - this._loadProfile(get(nextProps, 'currentAccount.name')); - } - } - } - _getReplies = async user => { const { isOwnProfile } = this.state; let repliesAction; @@ -318,6 +288,36 @@ class ProfileContainer extends Component { }); }; + UNSAFE_componentWillReceiveProps(nextProps) { + if (!nextProps.isConnected) { + return; + } + + const { isLoggedIn, navigation } = this.props; + const { isOwnProfile } = this.state; + + if (isLoggedIn && !nextProps.isLoggedIn) { + navigation.navigate(ROUTES.SCREENS.LOGIN); + return; + } + + if (isOwnProfile) { + const { user } = this.state; + const { activeBottomTab, currentAccount } = this.props; + + const currentUsername = + get(currentAccount, 'name') !== get(nextProps, 'currentAccount.name') && + get(nextProps, 'currentAccount.name'); + const isActiveTabChanged = + activeBottomTab !== get(nextProps, 'activeBottomTab') && + get(nextProps, 'activeBottomTab') === ROUTES.TABBAR.PROFILE; + + if ((isActiveTabChanged && user) || currentUsername) { + this._loadProfile(get(nextProps, 'currentAccount.name')); + } + } + } + render() { const { avatar, diff --git a/src/containers/steemWalletContainer.js b/src/containers/steemWalletContainer.js index ef3cb84a6..76050f1d1 100644 --- a/src/containers/steemWalletContainer.js +++ b/src/containers/steemWalletContainer.js @@ -1,7 +1,7 @@ import React, { useState, useEffect, useCallback } from 'react'; -import { connect } from 'react-redux'; +import { connect, useDispatch } from 'react-redux'; import { useIntl } from 'react-intl'; -import { useDispatch } from 'react-redux'; + import get from 'lodash/get'; import { toastNotification } from '../redux/actions/uiAction'; @@ -239,8 +239,8 @@ const WalletContainer = ({ claimRewardBalance: _claimRewardBalance, currentAccountUsername: currentAccount.name, handleOnWalletRefresh: _handleOnWalletRefresh, - isClaiming: isClaiming, - refreshing: refreshing, + isClaiming, + refreshing, selectedUsername: get(selectedUser, 'name', ''), isLoading, walletData, diff --git a/src/providers/esteem/esteem.js b/src/providers/esteem/esteem.js index 5abdfd4dc..6a44187dc 100644 --- a/src/providers/esteem/esteem.js +++ b/src/providers/esteem/esteem.js @@ -4,7 +4,7 @@ import imageApi from '../../config/imageApi'; import serverList from '../../config/serverListApi'; import { jsonStringify } from '../../utils/jsonUtils'; import bugsnag from '../../config/bugsnag'; -//market-data/currency-rate/USD/estm +// market-data/currency-rate/USD/estm export const getCurrencyRate = currency => api .get(`/market-data/currency-rate/${currency.toUpperCase()}/steem`) @@ -347,8 +347,6 @@ export const getNodes = () => 'https://rpc.buildteam.io', 'https://rpc.steemviz.com', 'https://api.steem.house', - 'https://steemd.pevo.science', - 'https://steemd.minnowsupportproject.org', ], ); diff --git a/src/providers/steem/dsteem.js b/src/providers/steem/dsteem.js index 1d2bfdaa8..f6329593a 100644 --- a/src/providers/steem/dsteem.js +++ b/src/providers/steem/dsteem.js @@ -1249,3 +1249,4 @@ const getActiveKey = (local, pin) => { return false; }; +/* eslint-enable */ diff --git a/src/screens/application/container/applicationContainer.js b/src/screens/application/container/applicationContainer.js index 116d3ed00..9784eec40 100644 --- a/src/screens/application/container/applicationContainer.js +++ b/src/screens/application/container/applicationContainer.js @@ -127,38 +127,6 @@ class ApplicationContainer extends Component { } }; - UNSAFE_componentWillReceiveProps(nextProps) { - const { - isDarkTheme: _isDarkTheme, - selectedLanguage, - isLogingOut, - isConnected, - api, - } = this.props; - - if ( - _isDarkTheme !== nextProps.isDarkTheme || - selectedLanguage !== nextProps.selectedLanguage || - (api !== nextProps.api && nextProps.api) - ) { - this.setState({ isRenderRequire: false }, () => this.setState({ isRenderRequire: true })); - if (nextProps.isDarkTheme) { - changeNavigationBarColor('#1e2835'); - } else { - changeNavigationBarColor('#FFFFFF', true); - } - } - - if (isLogingOut !== nextProps.isLogingOut && nextProps.isLogingOut) { - this._logout(); - } - - if (isConnected !== null && isConnected !== nextProps.isConnected && nextProps.isConnected) { - this._fetchApp(); - this.globalInterval = setInterval(this._refreshGlobalProps, 180000); - } - } - componentWillUnmount() { const { isIos } = this.state; const { isPinCodeOpen: _isPinCodeOpen } = this.props; @@ -531,7 +499,7 @@ class ApplicationContainer extends Component { }; _connectNotificationServer = username => { - /*eslint no-undef: "warn"*/ + /* eslint no-undef: "warn" */ const ws = new WebSocket(`${Config.ACTIVITY_WEBSOCKET_URL}?user=${username}`); ws.onmessage = () => { @@ -613,6 +581,38 @@ class ApplicationContainer extends Component { dispatch(updateCurrentAccount(_currentAccount)); }; + UNSAFE_componentWillReceiveProps(nextProps) { + const { + isDarkTheme: _isDarkTheme, + selectedLanguage, + isLogingOut, + isConnected, + api, + } = this.props; + + if ( + _isDarkTheme !== nextProps.isDarkTheme || + selectedLanguage !== nextProps.selectedLanguage || + (api !== nextProps.api && nextProps.api) + ) { + this.setState({ isRenderRequire: false }, () => this.setState({ isRenderRequire: true })); + if (nextProps.isDarkTheme) { + changeNavigationBarColor('#1e2835'); + } else { + changeNavigationBarColor('#FFFFFF', true); + } + } + + if (isLogingOut !== nextProps.isLogingOut && nextProps.isLogingOut) { + this._logout(); + } + + if (isConnected !== null && isConnected !== nextProps.isConnected && nextProps.isConnected) { + this._fetchApp(); + this.globalInterval = setInterval(this._refreshGlobalProps, 180000); + } + } + render() { const { selectedLanguage, @@ -672,3 +672,4 @@ export default connect( }, }), )(injectIntl(ApplicationContainer)); +/* eslint-enable */ diff --git a/src/screens/drafts/screen/draftsScreen.js b/src/screens/drafts/screen/draftsScreen.js index 4f2d18817..e93dfa8fe 100644 --- a/src/screens/drafts/screen/draftsScreen.js +++ b/src/screens/drafts/screen/draftsScreen.js @@ -161,3 +161,4 @@ class DraftsScreen extends Component { } export default injectIntl(DraftsScreen); +/* eslint-enable */ diff --git a/src/screens/editor/container/editorContainer.js b/src/screens/editor/container/editorContainer.js index 29b97b4b8..8eaffe9b5 100644 --- a/src/screens/editor/container/editorContainer.js +++ b/src/screens/editor/container/editorContainer.js @@ -311,7 +311,7 @@ class EditorContainer extends Component { const author = currentAccount.name; const options = makeOptions(author, permlink); - const parentPermlink = fields.tags[0]; + const parentPermlink = fields.tags[0] || 'hive-125125'; if (scheduleDate) { await this._setScheduledPost({ diff --git a/src/screens/editor/screen/editorScreen.js b/src/screens/editor/screen/editorScreen.js index 0b307e079..385ed3311 100644 --- a/src/screens/editor/screen/editorScreen.js +++ b/src/screens/editor/screen/editorScreen.js @@ -166,8 +166,9 @@ class EditorScreen extends Component { _handleOnTagAdded = async tags => { const { fields: _fields } = this.state; const _tags = tags.filter(tag => tag && tag !== ' '); + const __tags = _tags.map(t => t.toLowerCase()); - const fields = { ..._fields, tags: [..._tags] }; + const fields = { ..._fields, tags: [...__tags] }; await this.setState({ fields, isRemoveTag: false }); this._handleFormUpdate(); diff --git a/src/screens/notification/container/notificationContainer.js b/src/screens/notification/container/notificationContainer.js index 175956d20..3d83e3e31 100644 --- a/src/screens/notification/container/notificationContainer.js +++ b/src/screens/notification/container/notificationContainer.js @@ -35,20 +35,6 @@ class NotificationContainer extends Component { } } - UNSAFE_componentWillReceiveProps(nextProps) { - const { selectedFilter } = this.state; - const { username } = this.props; - - if ( - (nextProps.activeBottomTab === ROUTES.TABBAR.NOTIFICATION && nextProps.username) || - (nextProps.username !== username && nextProps.username) - ) { - this.setState({ endOfNotification: false }, () => - this._getAvtivities(nextProps.username, selectedFilter), - ); - } - } - _getAvtivities = (user, type = null, loadMore = false) => { const { lastNotificationId, notifications, endOfNotification } = this.state; const since = loadMore ? lastNotificationId : null; @@ -150,6 +136,20 @@ class NotificationContainer extends Component { await this.setState({ selectedFilter: value, endOfNotification: false, selectedIndex: ind }); }; + UNSAFE_componentWillReceiveProps(nextProps) { + const { selectedFilter } = this.state; + const { username } = this.props; + + if ( + (nextProps.activeBottomTab === ROUTES.TABBAR.NOTIFICATION && nextProps.username) || + (nextProps.username !== username && nextProps.username) + ) { + this.setState({ endOfNotification: false }, () => + this._getAvtivities(nextProps.username, selectedFilter), + ); + } + } + render() { const { isLoggedIn } = this.props; const { notifications, isNotificationRefreshing } = this.state; diff --git a/src/screens/pinCode/screen/pinCodeScreen.js b/src/screens/pinCode/screen/pinCodeScreen.js index 2271b600c..a1773a7e6 100644 --- a/src/screens/pinCode/screen/pinCodeScreen.js +++ b/src/screens/pinCode/screen/pinCodeScreen.js @@ -3,8 +3,7 @@ import { useIntl } from 'react-intl'; import { Text, TouchableOpacity, View } from 'react-native'; -import { NumericKeyboard, PinAnimatedInput } from '../../../components'; -import { UserAvatar } from '../../../components'; +import { NumericKeyboard, PinAnimatedInput, UserAvatar } from '../../../components'; import styles from './pinCodeStyles'; diff --git a/src/screens/post/container/postContainer.js b/src/screens/post/container/postContainer.js index 64fbbb5ed..e20f75645 100644 --- a/src/screens/post/container/postContainer.js +++ b/src/screens/post/container/postContainer.js @@ -44,17 +44,6 @@ class PostContainer extends Component { } } - UNSAFE_componentWillReceiveProps(nextProps) { - const { navigation } = this.props; - const { isFetch: nextIsFetch } = get(nextProps, 'navigation.state.params'); - - if (nextIsFetch) { - const { author, permlink } = get(navigation, 'state.params'); - - this._loadPost(author, permlink); - } - } - // Component Functions _loadPost = async (author = null, permlink = null, isParentPost = false) => { @@ -81,6 +70,17 @@ class PostContainer extends Component { }); }; + UNSAFE_componentWillReceiveProps(nextProps) { + const { navigation } = this.props; + const { isFetch: nextIsFetch } = get(nextProps, 'navigation.state.params'); + + if (nextIsFetch) { + const { author, permlink } = get(navigation, 'state.params'); + + this._loadPost(author, permlink); + } + } + render() { const { currentAccount, isLoggedIn } = this.props; const { error, isNewPost, parentPost, post, isPostUnavailable, author } = this.state; diff --git a/src/screens/settings/screen/settingsScreen.js b/src/screens/settings/screen/settingsScreen.js index 832879ba1..86d22226f 100644 --- a/src/screens/settings/screen/settingsScreen.js +++ b/src/screens/settings/screen/settingsScreen.js @@ -258,3 +258,4 @@ const SettingsScreen = ({ ); }; export default injectIntl(SettingsScreen); +/* eslint-enable */ diff --git a/src/screens/transfer/screen/delegateScreen.js b/src/screens/transfer/screen/delegateScreen.js index edd4d6f34..6293e4cb8 100644 --- a/src/screens/transfer/screen/delegateScreen.js +++ b/src/screens/transfer/screen/delegateScreen.js @@ -149,6 +149,7 @@ class DelegateScreen extends Component { parseToken(get(selectedAccount, 'delegated_vesting_shares')); } const fixedAmount = `${amount.toFixed(6)} VESTS`; + // eslint-disable-next-line max-len const path = `sign/delegate-vesting-shares?delegator=${from}&delegatee=${destination}&vesting_shares=${encodeURIComponent( fixedAmount, )}`; diff --git a/src/screens/transfer/screen/transferScreen.js b/src/screens/transfer/screen/transferScreen.js index 0ec8b0451..312e7a844 100644 --- a/src/screens/transfer/screen/transferScreen.js +++ b/src/screens/transfer/screen/transferScreen.js @@ -34,7 +34,7 @@ class TransferView extends Component { destination: props.transferType === 'powerUp' ? props.currentAccountName : '', amount: '', memo: '', - isUsernameValid: props.transferType === 'powerUp' && props.currentAccountName ? true : false, + isUsernameValid: !!(props.transferType === 'powerUp' && props.currentAccountName), steemConnectTransfer: false, isTransfering: false, }; diff --git a/src/utils/dsteemUtils.js b/src/utils/dsteemUtils.js index 9df01d673..b65228af7 100644 --- a/src/utils/dsteemUtils.js +++ b/src/utils/dsteemUtils.js @@ -1,8 +1,9 @@ import createIntl from './createIntl'; + export const getDsteemDateErrorMessage = error => { const intl = createIntl(); const trxTime = error.jse_info.stack[0].data['trx.expiration']; - const now = error.jse_info.stack[0].data.now; + const { now } = error.jse_info.stack[0].data; return `${intl.formatMessage({ id: 'dsteem.date_error.device_time', diff --git a/src/utils/filterNsfwPost.js b/src/utils/filterNsfwPost.js index 1642c639e..56aeeecb1 100644 --- a/src/utils/filterNsfwPost.js +++ b/src/utils/filterNsfwPost.js @@ -1,3 +1,4 @@ +/* eslint-disable array-callback-return */ export default (posts, option) => { const updatedPosts = []; if (option === '1') { @@ -18,3 +19,4 @@ export default (posts, option) => { return updatedPosts; } }; +/* eslint-enable */ diff --git a/src/utils/postParser.js b/src/utils/postParser.js index ba125be7b..a2b373b80 100644 --- a/src/utils/postParser.js +++ b/src/utils/postParser.js @@ -5,6 +5,7 @@ import get from 'lodash/get'; import { postBodySummary, renderPostBody } from '@esteemapp/esteem-render-helpers'; // Dsteem +// eslint-disable-next-line import/no-cycle import { getActiveVotes } from '../providers/steem/dsteem'; import { getPostReblogs } from '../providers/esteem/esteem'; diff --git a/src/utils/vote.js b/src/utils/vote.js index 8f36d10f4..69d61b53f 100644 --- a/src/utils/vote.js +++ b/src/utils/vote.js @@ -1,5 +1,5 @@ -import parseToken from './parseToken'; import get from 'lodash/get'; +import parseToken from './parseToken'; import { vestsToRshares } from './conversions'; export const getEstimatedAmount = (account, globalProps, value = 100) => { diff --git a/src/utils/wallet.js b/src/utils/wallet.js index 9430334cb..9479a296b 100644 --- a/src/utils/wallet.js +++ b/src/utils/wallet.js @@ -9,7 +9,7 @@ export const groomingTransactionData = (transaction, steemPerMVests, formatNumbe return []; } - let result = { iconType: 'MaterialIcons' }; + const result = { iconType: 'MaterialIcons' }; [result.textKey] = transaction[1].op; const opData = transaction[1].op[1]; @@ -172,7 +172,7 @@ export const groomingPointsTransactionData = transaction => { if (!transaction) { return null; } - let result = { ...transaction }; + const result = { ...transaction }; result.details = get(transaction, 'sender') ? `from @${get(transaction, 'sender')}` diff --git a/yarn.lock b/yarn.lock index 07108334d..c0d20ea2f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7670,10 +7670,10 @@ react-native-safe-modules@^1.0.0: dependencies: debounce "^1.2.0" -react-native-screens@^2.0.0-alpha.15: - version "2.0.0-alpha.15" - resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-2.0.0-alpha.15.tgz#40ee432d5f9b6169494a8fd6997add1a8c4b41b3" - integrity sha512-Nn4PRFSKLkP0MTXwqOIhMypJ7GMhcU+AZgFJd0DFQhNyU5sLNlKGEzQS6jRY+4MtHJnDXoMOr/o2l9WrI/O3Mg== +react-native-screens@^2.0.0-alpha.16: + version "2.0.0-alpha.16" + resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-2.0.0-alpha.16.tgz#4675c0e9b8cbd6b9321bfd3881b5939d61aba72b" + integrity sha512-CGa0LT+AksCgttrVfM3cp8VWxUz6xcInj+qCUY1Nvd2HQh4gP3WQtH3SDWvMC3pFy3CbK0CbXZz7UcZsG3pzwQ== dependencies: debounce "^1.2.0" From 12b6fb77e7b33085d8db156762bc845a4819a083 Mon Sep 17 00:00:00 2001 From: feruz Date: Tue, 3 Dec 2019 13:34:54 +0200 Subject: [PATCH 06/15] rename deprecated --- .../view/toastNotificaitonView.js | 10 +- .../toggleSwitch/view/toggleSwitchView.js | 7 +- .../container/applicationContainer.js | 10 +- .../application/screen/applicationScreen.js | 14 +- .../editor/container/editorContainer.js | 121 +++++++++--------- .../transfer/screen/powerDownScreen.js | 14 +- 6 files changed, 88 insertions(+), 88 deletions(-) diff --git a/src/components/toastNotification/view/toastNotificaitonView.js b/src/components/toastNotification/view/toastNotificaitonView.js index d3df2531c..4606ed037 100644 --- a/src/components/toastNotification/view/toastNotificaitonView.js +++ b/src/components/toastNotification/view/toastNotificaitonView.js @@ -17,11 +17,6 @@ class ToastNotification extends Component { }; } - // Component Life Cycles - componentWillMount() { - this._showToast(); - } - // Component Functions _showToast() { const { duration } = this.props; @@ -53,6 +48,11 @@ class ToastNotification extends Component { } } + // Component Life Cycles + UNSAFE_componentWillMount() { + this._showToast(); + } + render() { const { text, textStyle, style, onPress, isTop } = this.props; const { animatedValue } = this.state; diff --git a/src/components/toggleSwitch/view/toggleSwitchView.js b/src/components/toggleSwitch/view/toggleSwitchView.js index 76d1d761b..1c4158b62 100644 --- a/src/components/toggleSwitch/view/toggleSwitchView.js +++ b/src/components/toggleSwitch/view/toggleSwitchView.js @@ -28,9 +28,6 @@ class ToggleSwitchView extends PureComponent { } // Component Life Cycles - componentWillMount() { - this.setState({ duration: 0 }); - } componentDidMount() { this.setState({ duration: 300 }); @@ -96,6 +93,10 @@ class ToggleSwitchView extends PureComponent { }).start(); }; + UNSAFE_componentWillMount() { + this.setState({ duration: 0 }); + } + render() { this._triggerAnimation(); diff --git a/src/screens/application/container/applicationContainer.js b/src/screens/application/container/applicationContainer.js index 9784eec40..4b0934d27 100644 --- a/src/screens/application/container/applicationContainer.js +++ b/src/screens/application/container/applicationContainer.js @@ -96,11 +96,6 @@ class ApplicationContainer extends Component { }; } - componentWillMount() { - const { isDarkTheme: _isDarkTheme } = this.props; - EStyleSheet.build(_isDarkTheme ? darkTheme : lightTheme); - } - componentDidMount = () => { const { isIos } = this.state; this._setNetworkListener(); @@ -613,6 +608,11 @@ class ApplicationContainer extends Component { } } + UNSAFE_componentWillMount() { + const { isDarkTheme: _isDarkTheme } = this.props; + EStyleSheet.build(_isDarkTheme ? darkTheme : lightTheme); + } + render() { const { selectedLanguage, diff --git a/src/screens/application/screen/applicationScreen.js b/src/screens/application/screen/applicationScreen.js index f9efef068..736372bdc 100644 --- a/src/screens/application/screen/applicationScreen.js +++ b/src/screens/application/screen/applicationScreen.js @@ -27,7 +27,13 @@ class ApplicationScreen extends Component { }; } - componentWillMount() { + _handleOnHideToastNotification = () => { + const { dispatch } = this.props; + dispatch(toastNotificationAction('')); + this.setState({ isShowToastNotification: false }); + }; + + UNSAFE_componentWillMount() { const { isDarkTheme } = this.props; EStyleSheet.build(isDarkTheme ? darkTheme : lightTheme); } @@ -39,12 +45,6 @@ class ApplicationScreen extends Component { } } - _handleOnHideToastNotification = () => { - const { dispatch } = this.props; - dispatch(toastNotificationAction('')); - this.setState({ isShowToastNotification: false }); - }; - render() { const { isConnected, isDarkTheme, toastNotification, isReady } = this.props; const { isShowToastNotification } = this.state; diff --git a/src/screens/editor/container/editorContainer.js b/src/screens/editor/container/editorContainer.js index 8eaffe9b5..3fb07d47f 100644 --- a/src/screens/editor/container/editorContainer.js +++ b/src/screens/editor/container/editorContainer.js @@ -54,67 +54,6 @@ class EditorContainer extends Component { }; } - // Component Life Cycle Functions - - componentWillMount() { - const { currentAccount, navigation } = this.props; - const username = currentAccount && currentAccount.name ? currentAccount.name : ''; - let isReply; - let isEdit; - let post; - let _draft; - - if (navigation.state && navigation.state.params) { - const navigationParams = navigation.state.params; - - if (navigationParams.draft) { - _draft = navigationParams.draft; - - this.setState({ - draftPost: { - title: _draft.title, - body: _draft.body, - tags: _draft.tags.includes(' ') ? _draft.tags.split(' ') : _draft.tags.split(','), - }, - draftId: _draft._id, - isDraft: true, - }); - } - - if (navigationParams.post) { - ({ post } = navigationParams); - this.setState({ post }); - } - - if (navigationParams.isReply) { - ({ isReply } = navigationParams); - this.setState({ isReply }); - } - - if (navigationParams.isEdit) { - ({ isEdit } = navigationParams); - this.setState({ - isEdit, - draftPost: { - title: get(post, 'title', ''), - body: get(post, 'markdownBody', ''), - tags: get(post, 'json_metadata.tags', []), - }, - }); - } - - if (navigationParams.action) { - this._handleRoutingAction(navigationParams.action); - } - } else { - this.setState({ autoFocusText: true }); - } - - if (!isEdit && !_draft) { - this._getDraft(username, isReply); - } - } - _getDraft = async (username, isReply) => { if (isReply) { const draftReply = await AsyncStorage.getItem('temp-reply'); @@ -553,6 +492,66 @@ class EditorContainer extends Component { this.setState({ uploadedImage: null }); }; + // Component Life Cycle Functions + UNSAFE_componentWillMount() { + const { currentAccount, navigation } = this.props; + const username = currentAccount && currentAccount.name ? currentAccount.name : ''; + let isReply; + let isEdit; + let post; + let _draft; + + if (navigation.state && navigation.state.params) { + const navigationParams = navigation.state.params; + + if (navigationParams.draft) { + _draft = navigationParams.draft; + + this.setState({ + draftPost: { + title: _draft.title, + body: _draft.body, + tags: _draft.tags.includes(' ') ? _draft.tags.split(' ') : _draft.tags.split(','), + }, + draftId: _draft._id, + isDraft: true, + }); + } + + if (navigationParams.post) { + ({ post } = navigationParams); + this.setState({ post }); + } + + if (navigationParams.isReply) { + ({ isReply } = navigationParams); + this.setState({ isReply }); + } + + if (navigationParams.isEdit) { + ({ isEdit } = navigationParams); + this.setState({ + isEdit, + draftPost: { + title: get(post, 'title', ''), + body: get(post, 'markdownBody', ''), + tags: get(post, 'json_metadata.tags', []), + }, + }); + } + + if (navigationParams.action) { + this._handleRoutingAction(navigationParams.action); + } + } else { + this.setState({ autoFocusText: true }); + } + + if (!isEdit && !_draft) { + this._getDraft(username, isReply); + } + } + render() { const { isLoggedIn, isDarkTheme } = this.props; const { diff --git a/src/screens/transfer/screen/powerDownScreen.js b/src/screens/transfer/screen/powerDownScreen.js index be92b5633..65742ab48 100644 --- a/src/screens/transfer/screen/powerDownScreen.js +++ b/src/screens/transfer/screen/powerDownScreen.js @@ -48,13 +48,6 @@ class PowerDownView extends Component { this.stopActionSheet = React.createRef(); } - // Component Life Cycles - componentWillMount() { - const { currentAccountName } = this.props; - - this._fetchRoutes(currentAccountName); - } - // Component Functions _fetchRoutes = username => { @@ -189,6 +182,13 @@ class PowerDownView extends Component { } }; + // Component Life Cycles + UNSAFE_componentWillMount() { + const { currentAccountName } = this.props; + + this._fetchRoutes(currentAccountName); + } + render() { const { accounts, From 848d13707acc329defa1d47883393c5f2cfd3b9a Mon Sep 17 00:00:00 2001 From: feruz Date: Tue, 3 Dec 2019 16:05:10 +0200 Subject: [PATCH 07/15] some more lint cleaning --- .eslintrc.json | 21 +++---- package.json | 1 + .../components/statefull/view/exampleView.js | 1 + .../animations/pulse/pulseAnimation.js | 5 +- .../view/placeHolder/boostPlaceHolderView.js | 1 + .../view/placeHolder/listPlaceHolderView.js | 1 + .../placeHolder/walletDetailsPlaceHolder.js | 1 + src/components/bottomTabBar/view/tabbar.js | 2 + .../view/collapsibleCardView.js | 34 +++++------ .../comments/container/commentsContainer.js | 26 ++++---- .../dateTimePicker/view/dateTimePickerView.js | 1 + .../tagArea/view/tagAreaView.js | 33 +++++----- .../formInput/view/formInputView.js | 18 +++--- src/components/index.js | 3 +- .../mainButton/view/mainButtonView.js | 20 +++---- .../notification/view/notificationView.js | 1 + .../view/notificationLineView.js | 2 + .../views/pinAnimatedInputView.js | 24 ++++---- .../postCard/container/postCardContainer.js | 12 ++-- src/components/postCard/view/postCardView.js | 22 +++---- .../postElements/body/view/postBodyView.js | 2 +- .../container/postDisplayContainer.js | 16 ++--- src/components/posts/view/postsView.js | 1 + src/components/scaleSlider/scaleSliderView.js | 2 + src/components/spinGame/spinGameView.js | 2 + src/components/transaction/transactionView.js | 1 + src/components/wallet/view/walletView.js | 1 + .../walletHeader/view/walletHeaderView.js | 1 + src/containers/accountContainer.js | 1 + src/containers/inAppPurchaseContainer.js | 1 + src/containers/loggedInContainer.js | 1 + src/containers/profileContainer.js | 1 + src/containers/themeContainer.js | 1 + src/screens/follows/screen/followsScreen.js | 1 + .../container/notificationContainer.js | 2 + .../transfer/screen/powerDownScreen.js | 2 + src/utils/postUrlParser.js | 1 + yarn.lock | 60 +++++++++++++++++-- 38 files changed, 204 insertions(+), 122 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 3e9fc02bf..b076ff36a 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -5,15 +5,18 @@ "prettier", "plugin:prettier/recommended", "plugin:eslint-comments/recommended", + "eslint:recommended", "plugin:import/errors", "plugin:import/warnings", "plugin:jest/recommended", - "@react-native-community" + "@react-native-community", + "plugin:import/typescript" ], "env": { "browser": true, "jest": true, - "react-native/react-native": true + "react-native/react-native": true, + "node": true }, "plugins": [ "react", @@ -32,7 +35,7 @@ "extensions": [".js", ".jsx"] } ], - "max-len": ["error", 100], + "max-len": ["warn", 100], "react/forbid-prop-types": [0], "no-underscore-dangle": 0, "react/require-default-props": [0], @@ -45,7 +48,7 @@ "import/no-named-default": "off", "no-param-reassign": "off", "no-case-declarations": "off", - "no-cycle": "off", + "import/no-cycle": "off", "react-hooks/rules-of-hooks": "error", "react-hooks/exhaustive-deps": "off", "react/destructuring-assignment": [1, "always"], @@ -54,13 +57,7 @@ { "devDependencies": true } - ] - }, - "settings": { - "import/resolver": { - "node": { - "extensions": [".js", ".jsx"] - } - } + ], + "import/no-unresolved": "off" } } diff --git a/package.json b/package.json index 03ecbcbb8..c00e0480e 100644 --- a/package.json +++ b/package.json @@ -95,6 +95,7 @@ "@babel/core": "^7.6.2", "@babel/runtime": "^7.6.2", "@react-native-community/eslint-config": "^0.0.5", + "@typescript-eslint/parser": "^2.10.0", "babel-eslint": "^10.0.1", "babel-jest": "^24.9.0", "babel-preset-react-native": "~5.0.2", diff --git a/src/_EXAMPLES FOR DEVELOPERS/components/statefull/view/exampleView.js b/src/_EXAMPLES FOR DEVELOPERS/components/statefull/view/exampleView.js index affc9b005..c785f5692 100644 --- a/src/_EXAMPLES FOR DEVELOPERS/components/statefull/view/exampleView.js +++ b/src/_EXAMPLES FOR DEVELOPERS/components/statefull/view/exampleView.js @@ -32,3 +32,4 @@ class ExampleView extends Component { } export default ExampleView; +/* eslint-enable */ diff --git a/src/components/animations/pulse/pulseAnimation.js b/src/components/animations/pulse/pulseAnimation.js index 9c0275ffb..d7fbf65e5 100644 --- a/src/components/animations/pulse/pulseAnimation.js +++ b/src/components/animations/pulse/pulseAnimation.js @@ -15,6 +15,8 @@ const styles = StyleSheet.create({ }); class PulseAnimation extends Component { + mounted = true; + static defaultProps = { color: 'blue', diameter: 400, @@ -33,8 +35,6 @@ class PulseAnimation extends Component { }, }; - mounted = true; - constructor(props) { super(props); @@ -97,6 +97,7 @@ class PulseAnimation extends Component { updatePulse = () => { if (this.mounted) { + // eslint-disable-next-line react/no-access-state-in-setstate const pulses = this.state.pulses.map((p, i) => { const { maxDiameter } = this.state; const newDiameter = p.diameter > maxDiameter ? 0 : p.diameter + 2; diff --git a/src/components/basicUIElements/view/placeHolder/boostPlaceHolderView.js b/src/components/basicUIElements/view/placeHolder/boostPlaceHolderView.js index 2bf401d72..ff90a6442 100644 --- a/src/components/basicUIElements/view/placeHolder/boostPlaceHolderView.js +++ b/src/components/basicUIElements/view/placeHolder/boostPlaceHolderView.js @@ -51,3 +51,4 @@ const BoostPlaceHolder = () => { }; export default BoostPlaceHolder; +/* eslint-enable */ diff --git a/src/components/basicUIElements/view/placeHolder/listPlaceHolderView.js b/src/components/basicUIElements/view/placeHolder/listPlaceHolderView.js index 66478b5d0..9fc9038d6 100644 --- a/src/components/basicUIElements/view/placeHolder/listPlaceHolderView.js +++ b/src/components/basicUIElements/view/placeHolder/listPlaceHolderView.js @@ -18,3 +18,4 @@ const ListPlaceHolderView = () => { return {listElements}; }; export default ListPlaceHolderView; +/* eslint-enable */ diff --git a/src/components/basicUIElements/view/placeHolder/walletDetailsPlaceHolder.js b/src/components/basicUIElements/view/placeHolder/walletDetailsPlaceHolder.js index 7f8c6d69c..462c69934 100644 --- a/src/components/basicUIElements/view/placeHolder/walletDetailsPlaceHolder.js +++ b/src/components/basicUIElements/view/placeHolder/walletDetailsPlaceHolder.js @@ -43,3 +43,4 @@ const WalletDetailsPlaceHolder = () => ( ); export default WalletDetailsPlaceHolder; +/* eslint-enable */ diff --git a/src/components/bottomTabBar/view/tabbar.js b/src/components/bottomTabBar/view/tabbar.js index 5b8f1ee27..90f5aec06 100644 --- a/src/components/bottomTabBar/view/tabbar.js +++ b/src/components/bottomTabBar/view/tabbar.js @@ -97,6 +97,7 @@ export default class TabBar extends Component { return React.cloneElement(route, { selected: selectedIndex === i, onPress: this._onPress, + // eslint-disable-next-line react/no-array-index-key key: i, index: i, showIcon: true, @@ -126,6 +127,7 @@ export default class TabBar extends Component { pathX}.941653,71.4462087 ${31 + pathX}.454074,80.6628108 Z`} /> (this._myCircle = ref)} fill={circleBackgroundColor} cx={circleRadius} diff --git a/src/components/collapsibleCard/view/collapsibleCardView.js b/src/components/collapsibleCard/view/collapsibleCardView.js index 981a5e9d5..812de17fa 100644 --- a/src/components/collapsibleCard/view/collapsibleCardView.js +++ b/src/components/collapsibleCard/view/collapsibleCardView.js @@ -32,23 +32,6 @@ class CollapsibleCardView extends PureComponent { }; } - UNSAFE_componentWillReceiveProps(nextProps) { - const { isExpanded, moreHeight, locked } = this.props; - const { expanded } = this.state; - - if ( - (locked || !nextProps.isExpanded) && - isExpanded !== nextProps.isExpanded && - expanded !== nextProps.isExpanded - ) { - this._toggleOnPress(); - } - - if (moreHeight !== nextProps.moreHeight) { - this.anime.height.setValue(this._getMaxValue() + nextProps.moreHeight); - } - } - // Component Functions _initContentHeight = event => { if (this.anime.contentHeight > 0) { @@ -79,6 +62,23 @@ class CollapsibleCardView extends PureComponent { } }; + UNSAFE_componentWillReceiveProps(nextProps) { + const { isExpanded, moreHeight, locked } = this.props; + const { expanded } = this.state; + + if ( + (locked || !nextProps.isExpanded) && + isExpanded !== nextProps.isExpanded && + expanded !== nextProps.isExpanded + ) { + this._toggleOnPress(); + } + + if (moreHeight !== nextProps.moreHeight) { + this.anime.height.setValue(this._getMaxValue() + nextProps.moreHeight); + } + } + render() { const { title, diff --git a/src/components/comments/container/commentsContainer.js b/src/components/comments/container/commentsContainer.js index 17607b756..26ccbd75d 100644 --- a/src/components/comments/container/commentsContainer.js +++ b/src/components/comments/container/commentsContainer.js @@ -36,19 +36,6 @@ class CommentsContainer extends Component { this._getComments(); } - UNSAFE_componentWillReceiveProps(nextProps) { - const { commentCount, selectedFilter } = this.props; - - if (nextProps.commentCount > commentCount) { - this._getComments(); - } - - if (selectedFilter !== get(nextProps, 'selectedFilter') && get(nextProps, 'selectedFilter')) { - const shortedComments = this._shortComments(get(nextProps, 'selectedFilter')); - this.setState({ comments: shortedComments }); - } - } - // Component Functions _shortComments = (sortOrder, comments) => { @@ -244,6 +231,19 @@ class CommentsContainer extends Component { } }; + UNSAFE_componentWillReceiveProps(nextProps) { + const { commentCount, selectedFilter } = this.props; + + if (nextProps.commentCount > commentCount) { + this._getComments(); + } + + if (selectedFilter !== get(nextProps, 'selectedFilter') && get(nextProps, 'selectedFilter')) { + const shortedComments = this._shortComments(get(nextProps, 'selectedFilter')); + this.setState({ comments: shortedComments }); + } + } + render() { const { comments: _comments, selectedPermlink } = this.state; const { diff --git a/src/components/dateTimePicker/view/dateTimePickerView.js b/src/components/dateTimePicker/view/dateTimePickerView.js index 6f9675498..00950b77d 100644 --- a/src/components/dateTimePicker/view/dateTimePickerView.js +++ b/src/components/dateTimePicker/view/dateTimePickerView.js @@ -105,3 +105,4 @@ DateTimePickerView.defaultProps = { }; export default injectIntl(DateTimePickerView); +/* eslint-enable */ diff --git a/src/components/editorElements/tagArea/view/tagAreaView.js b/src/components/editorElements/tagArea/view/tagAreaView.js index c483ab277..4fc24a0f9 100644 --- a/src/components/editorElements/tagArea/view/tagAreaView.js +++ b/src/components/editorElements/tagArea/view/tagAreaView.js @@ -24,22 +24,6 @@ export default class TagAreaView extends Component { }; } - // Component Life Cycles - UNSAFE_componentWillReceiveProps(nextProps) { - const { draftChips, isRemoveTag } = this.props; - - if (nextProps.draftChips && nextProps.draftChips !== draftChips) { - const _chips = [...nextProps.draftChips, ' ']; - this.setState({ - chips: _chips, - }); - } - - if (isRemoveTag !== nextProps.isRemoveTag && nextProps.isRemoveTag) { - this.setState({ chips: [' '], currentText: '' }); - } - } - // Component Functions _handleOnChange = (text, i) => { this.setState({ currentText: text.replace(/\s/g, '').replace(/,/g, '') }); @@ -96,6 +80,22 @@ export default class TagAreaView extends Component { } }; + // Component Life Cycles + UNSAFE_componentWillReceiveProps(nextProps) { + const { draftChips, isRemoveTag } = this.props; + + if (nextProps.draftChips && nextProps.draftChips !== draftChips) { + const _chips = [...nextProps.draftChips, ' ']; + this.setState({ + chips: _chips, + }); + } + + if (isRemoveTag !== nextProps.isRemoveTag && nextProps.isRemoveTag) { + this.setState({ chips: [' '], currentText: '' }); + } + } + render() { const { isPreviewActive } = this.props; const { chips, activeChip, currentText } = this.state; @@ -107,6 +107,7 @@ export default class TagAreaView extends Component { (chip, i) => i < 7 && ( { this.inputs[i] = input; diff --git a/src/components/formInput/view/formInputView.js b/src/components/formInput/view/formInputView.js index 1925bf366..5c4f431a8 100644 --- a/src/components/formInput/view/formInputView.js +++ b/src/components/formInput/view/formInputView.js @@ -33,15 +33,6 @@ class FormInputView extends Component { }; } - // Component Life Cycles - UNSAFE_componentWillReceiveProps(nextProps) { - const { isValid } = this.props; - - if (nextProps.isValid !== isValid) { - this.setState({ isValid: nextProps.isValid }); - } - } - // Component Functions _handleOnChange = value => { const { onChange } = this.props; @@ -56,6 +47,15 @@ class FormInputView extends Component { this.setState({ inputBorderColor: '#357ce6' }); }; + // Component Life Cycles + UNSAFE_componentWillReceiveProps(nextProps) { + const { isValid } = this.props; + + if (nextProps.isValid !== isValid) { + this.setState({ isValid: nextProps.isValid }); + } + } + render() { const { inputBorderColor, isValid, value } = this.state; const { diff --git a/src/components/index.js b/src/components/index.js index 95e61eae2..8bf7cd499 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -38,7 +38,7 @@ import { SearchModal } from './searchModal'; import { SettingsItem } from './settingsItem'; import { SideMenu } from './sideMenu'; -import { SummaryArea, TagArea, TextArea, TitleArea } from './editorElements'; +import { SummaryArea, TagArea, TitleArea } from './editorElements'; import { TabBar } from './tabBar'; import { TextInput } from './textInput'; import { ToastNotification } from './toastNotification'; @@ -171,7 +171,6 @@ export { Tag, TagArea, Tags, - TextArea, TextButton, TextInput, TextWithIcon, diff --git a/src/components/mainButton/view/mainButtonView.js b/src/components/mainButton/view/mainButtonView.js index cd395fdcc..0133af266 100644 --- a/src/components/mainButton/view/mainButtonView.js +++ b/src/components/mainButton/view/mainButtonView.js @@ -27,16 +27,6 @@ class MainButton extends Component { }; } - // Component Life Cycles - UNSAFE_componentWillReceiveProps(nextProps) { - const { isLoading, isDisable } = this.props; - if (nextProps.isLoading !== isLoading || nextProps.isDisable !== isDisable) { - this.setState({ - isDisable: !nextProps.isLoading && nextProps.isDisable, - }); - } - } - // Component Functions _handleOnPress = () => { const { onPress } = this.props; @@ -88,6 +78,16 @@ class MainButton extends Component { _getIndicator = () => ; + // Component Life Cycles + UNSAFE_componentWillReceiveProps(nextProps) { + const { isLoading, isDisable } = this.props; + if (nextProps.isLoading !== isLoading || nextProps.isDisable !== isDisable) { + this.setState({ + isDisable: !nextProps.isLoading && nextProps.isDisable, + }); + } + } + render() { const { wrapperStyle, children, height, style, isLoading } = this.props; const { isDisable } = this.state; diff --git a/src/components/notification/view/notificationView.js b/src/components/notification/view/notificationView.js index 2c142f968..a25dd9b0f 100644 --- a/src/components/notification/view/notificationView.js +++ b/src/components/notification/view/notificationView.js @@ -214,3 +214,4 @@ class NotificationView extends PureComponent { } export default injectIntl(NotificationView); +/* eslint-enable */ diff --git a/src/components/notificationLine/view/notificationLineView.js b/src/components/notificationLine/view/notificationLineView.js index 96ff3e7ef..421aea7dd 100644 --- a/src/components/notificationLine/view/notificationLineView.js +++ b/src/components/notificationLine/view/notificationLineView.js @@ -1,3 +1,4 @@ +/* eslint-disable react/jsx-one-expression-per-line */ import React, { useState, useEffect } from 'react'; import { View, Text, Image, TouchableHighlight } from 'react-native'; import { useIntl } from 'react-intl'; @@ -75,3 +76,4 @@ const NotificationLineView = ({ notification, handleOnPressNotification }) => { }; export default NotificationLineView; +/* eslint-enable */ diff --git a/src/components/pinAnimatedInput/views/pinAnimatedInputView.js b/src/components/pinAnimatedInput/views/pinAnimatedInputView.js index 77dc98e9f..86e3e8464 100644 --- a/src/components/pinAnimatedInput/views/pinAnimatedInputView.js +++ b/src/components/pinAnimatedInput/views/pinAnimatedInputView.js @@ -1,3 +1,4 @@ +/* eslint-disable react/no-array-index-key */ import React, { Component } from 'react'; import { Animated, Easing, View } from 'react-native'; @@ -22,17 +23,6 @@ class PinAnimatedInput extends Component { this.dots[3] = new Animated.Value(0); } - UNSAFE_componentWillReceiveProps(nextProps) { - const { loading } = this.props; - if (loading !== nextProps.loading) { - if (nextProps.loading) { - this._startLoadingAnimation(); - } else { - this._stopLoadingAnimation(); - } - } - } - _startLoadingAnimation = () => { [...Array(4)].map((item, index) => { this.dots[index].setValue(0); @@ -58,6 +48,17 @@ class PinAnimatedInput extends Component { }); }; + UNSAFE_componentWillReceiveProps(nextProps) { + const { loading } = this.props; + if (loading !== nextProps.loading) { + if (nextProps.loading) { + this._startLoadingAnimation(); + } else { + this._stopLoadingAnimation(); + } + } + } + render() { const { pin } = this.props; const marginBottom = []; @@ -88,3 +89,4 @@ class PinAnimatedInput extends Component { } export default PinAnimatedInput; +/* eslint-enable */ diff --git a/src/components/postCard/container/postCardContainer.js b/src/components/postCard/container/postCardContainer.js index 29c28a937..c63f84421 100644 --- a/src/components/postCard/container/postCardContainer.js +++ b/src/components/postCard/container/postCardContainer.js @@ -24,12 +24,6 @@ class PostCardContainer extends PureComponent { }; } - UNSAFE_componentWillReceiveProps(nextProps) { - if (get(nextProps, 'isRefresh')) { - this._fetchPost(); - } - } - _handleOnUserPress = () => { const { navigation, currentAccount, content } = this.props; if (content && get(currentAccount, 'name') !== get(content, 'author')) { @@ -94,6 +88,12 @@ class PostCardContainer extends PureComponent { .catch(() => {}); }; + UNSAFE_componentWillReceiveProps(nextProps) { + if (get(nextProps, 'isRefresh')) { + this._fetchPost(); + } + } + render() { const { content, isHideImage, nsfw } = this.props; const { _content } = this.state; diff --git a/src/components/postCard/view/postCardView.js b/src/components/postCard/view/postCardView.js index 759a5370f..6565edbb3 100644 --- a/src/components/postCard/view/postCardView.js +++ b/src/components/postCard/view/postCardView.js @@ -36,17 +36,6 @@ class PostCardView extends Component { }; } - // Component Lifecycle Functions - UNSAFE_componentWillReceiveProps(nextProps) { - const { content } = this.props; - const rebloggedBy = get(content, 'reblogged_by[0]', null); - const _rebloggedBy = get(nextProps.content, 'reblogged_by[0]', null); - - if (rebloggedBy !== _rebloggedBy && !_rebloggedBy) { - this.setState({ rebloggedBy }); - } - } - // Component Functions _handleOnUserPress = () => { @@ -87,6 +76,17 @@ class PostCardView extends Component { return DEFAULT_IMAGE; }; + // Component Lifecycle Functions + UNSAFE_componentWillReceiveProps(nextProps) { + const { content } = this.props; + const rebloggedBy = get(content, 'reblogged_by[0]', null); + const _rebloggedBy = get(nextProps.content, 'reblogged_by[0]', null); + + if (rebloggedBy !== _rebloggedBy && !_rebloggedBy) { + this.setState({ rebloggedBy }); + } + } + render() { const { content, isHideImage, fetchPost, isNsfwPost, intl } = this.props; const { rebloggedBy } = this.state; diff --git a/src/components/postElements/body/view/postBodyView.js b/src/components/postElements/body/view/postBodyView.js index 5c36943c7..2ced532b4 100644 --- a/src/components/postElements/body/view/postBodyView.js +++ b/src/components/postElements/body/view/postBodyView.js @@ -6,7 +6,7 @@ import AutoHeightWebView from 'react-native-autoheight-webview'; import EStyleSheet from 'react-native-extended-stylesheet'; import get from 'lodash/get'; -import script from './config.js'; +import script from './config'; import { PostPlaceHolder, CommentPlaceHolder } from '../../../basicUIElements'; // Constants diff --git a/src/components/postView/container/postDisplayContainer.js b/src/components/postView/container/postDisplayContainer.js index 128b7b14a..ebbaa8f9e 100644 --- a/src/components/postView/container/postDisplayContainer.js +++ b/src/components/postView/container/postDisplayContainer.js @@ -29,14 +29,6 @@ class PostDisplayContainer extends Component { this.state = {}; } - // Component Life Cycle Functions - UNSAFE_componentWillReceiveProps(nextProps) { - const { isFetchPost } = this.props; - if (isFetchPost !== nextProps.isFetchPost && nextProps.isFetchPost) { - this._fetchPost(); - } - } - // Component Functions _handleOnVotersPress = activeVotes => { const { navigation, post } = this.props; @@ -119,6 +111,14 @@ class PostDisplayContainer extends Component { } }; + // Component Life Cycle Functions + UNSAFE_componentWillReceiveProps(nextProps) { + const { isFetchPost } = this.props; + if (isFetchPost !== nextProps.isFetchPost && nextProps.isFetchPost) { + this._fetchPost(); + } + } + render() { const { currentAccount, diff --git a/src/components/posts/view/postsView.js b/src/components/posts/view/postsView.js index 4ba6af774..c366d6562 100644 --- a/src/components/posts/view/postsView.js +++ b/src/components/posts/view/postsView.js @@ -397,3 +397,4 @@ const PostsView = ({ }; export default withNavigation(PostsView); +/* eslint-enable */ diff --git a/src/components/scaleSlider/scaleSliderView.js b/src/components/scaleSlider/scaleSliderView.js index 71e0f0663..2461924a0 100644 --- a/src/components/scaleSlider/scaleSliderView.js +++ b/src/components/scaleSlider/scaleSliderView.js @@ -1,3 +1,4 @@ +/* eslint-disable react/no-unused-state */ import React, { Component } from 'react'; import { View, Dimensions, Text } from 'react-native'; import MultiSlider from '@ptomasroos/react-native-multi-slider'; @@ -82,3 +83,4 @@ export default class ScaleSliderView extends Component { ); } } +/* eslint-enable */ diff --git a/src/components/spinGame/spinGameView.js b/src/components/spinGame/spinGameView.js index 2b09606b9..ac55cc032 100644 --- a/src/components/spinGame/spinGameView.js +++ b/src/components/spinGame/spinGameView.js @@ -1,3 +1,4 @@ +/* eslint-disable react/no-this-in-sfc */ import React, { useState, Fragment } from 'react'; import { Image, Text, View } from 'react-native'; import moment from 'moment'; @@ -98,3 +99,4 @@ const SpinGameView = ({ }; export { SpinGameView as SpinGame }; +/* eslint-enable */ diff --git a/src/components/transaction/transactionView.js b/src/components/transaction/transactionView.js index 968acded5..066835b3f 100644 --- a/src/components/transaction/transactionView.js +++ b/src/components/transaction/transactionView.js @@ -94,3 +94,4 @@ const TransactionView = ({ transactions, type, refreshing, setRefreshing, isLoad }; export default TransactionView; +/* eslint-enable */ diff --git a/src/components/wallet/view/walletView.js b/src/components/wallet/view/walletView.js index e71f9768c..8a1b09e23 100644 --- a/src/components/wallet/view/walletView.js +++ b/src/components/wallet/view/walletView.js @@ -131,3 +131,4 @@ const WalletView = ({ setEstimatedWalletValue, selectedUser, handleOnScroll }) = }; export default WalletView; +/* eslint-enable */ diff --git a/src/components/walletHeader/view/walletHeaderView.js b/src/components/walletHeader/view/walletHeaderView.js index ae9f80a95..42a51632c 100644 --- a/src/components/walletHeader/view/walletHeaderView.js +++ b/src/components/walletHeader/view/walletHeaderView.js @@ -113,3 +113,4 @@ const WalletHeaderView = ({ }; export default withNavigation(WalletHeaderView); +/* eslint-enable */ diff --git a/src/containers/accountContainer.js b/src/containers/accountContainer.js index dc3d6711a..cf3c8c2fe 100644 --- a/src/containers/accountContainer.js +++ b/src/containers/accountContainer.js @@ -31,3 +31,4 @@ const mapStateToProps = state => ({ }); export default connect(mapStateToProps)(AccountContainer); +/* eslint-enable */ diff --git a/src/containers/inAppPurchaseContainer.js b/src/containers/inAppPurchaseContainer.js index 852c8367e..56097adb8 100644 --- a/src/containers/inAppPurchaseContainer.js +++ b/src/containers/inAppPurchaseContainer.js @@ -173,3 +173,4 @@ const mapStateToProps = state => ({ }); export default withNavigation(injectIntl(connect(mapStateToProps)(InAppPurchaseContainer))); +/* eslint-enable */ diff --git a/src/containers/loggedInContainer.js b/src/containers/loggedInContainer.js index 9024fb494..c673e3d19 100644 --- a/src/containers/loggedInContainer.js +++ b/src/containers/loggedInContainer.js @@ -38,3 +38,4 @@ const mapStateToProps = state => ({ }); export default connect(mapStateToProps)(LoggedInContainer); +/* eslint-enable */ diff --git a/src/containers/profileContainer.js b/src/containers/profileContainer.js index abcddda00..4a1b0bdb6 100644 --- a/src/containers/profileContainer.js +++ b/src/containers/profileContainer.js @@ -399,3 +399,4 @@ const mapStateToProps = state => ({ }); export default connect(mapStateToProps)(withNavigation(ProfileContainer)); +/* eslint-enable */ diff --git a/src/containers/themeContainer.js b/src/containers/themeContainer.js index 22a24adff..cd40a3a83 100644 --- a/src/containers/themeContainer.js +++ b/src/containers/themeContainer.js @@ -16,3 +16,4 @@ const mapStateToProps = state => ({ }); export default connect(mapStateToProps)(ThemeContainer); +/* eslint-enable */ diff --git a/src/screens/follows/screen/followsScreen.js b/src/screens/follows/screen/followsScreen.js index 4f8a7981b..3fb6e291e 100644 --- a/src/screens/follows/screen/followsScreen.js +++ b/src/screens/follows/screen/followsScreen.js @@ -67,3 +67,4 @@ class FollowsScreen extends PureComponent { } export default injectIntl(FollowsScreen); +/* eslint-enable */ diff --git a/src/screens/notification/container/notificationContainer.js b/src/screens/notification/container/notificationContainer.js index 3d83e3e31..ec3192493 100644 --- a/src/screens/notification/container/notificationContainer.js +++ b/src/screens/notification/container/notificationContainer.js @@ -1,3 +1,4 @@ +/* eslint-disable react/no-unused-state */ import React, { Component } from 'react'; import { Alert } from 'react-native'; import { connect } from 'react-redux'; @@ -178,3 +179,4 @@ const mapStateToProps = state => ({ }); export default injectIntl(connect(mapStateToProps)(NotificationContainer)); +/* eslint-enable */ diff --git a/src/screens/transfer/screen/powerDownScreen.js b/src/screens/transfer/screen/powerDownScreen.js index 65742ab48..6e4cfe887 100644 --- a/src/screens/transfer/screen/powerDownScreen.js +++ b/src/screens/transfer/screen/powerDownScreen.js @@ -1,3 +1,4 @@ +/* eslint-disable react/no-unused-state */ import React, { Fragment, Component } from 'react'; import { Text, View, ScrollView, Alert } from 'react-native'; import ActionSheet from 'react-native-actionsheet'; @@ -366,3 +367,4 @@ class PowerDownView extends Component { } export default injectIntl(PowerDownView); +/* eslint-enable */ diff --git a/src/utils/postUrlParser.js b/src/utils/postUrlParser.js index 025edb03b..a0de1c2ed 100644 --- a/src/utils/postUrlParser.js +++ b/src/utils/postUrlParser.js @@ -46,6 +46,7 @@ export default url => { url = url.replace('esteem://', 'https://esteem.app/'); } + // eslint-disable-next-line no-useless-escape const feedMatch = url.match(/^https:\/\/([\w-\.]*)\/([\w-]*)\/?([\w-]*)\/?$/); if (feedMatch) { diff --git a/yarn.lock b/yarn.lock index c0d20ea2f..070e39575 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1582,6 +1582,15 @@ "@typescript-eslint/typescript-estree" "1.13.0" eslint-scope "^4.0.0" +"@typescript-eslint/experimental-utils@2.10.0": + version "2.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.10.0.tgz#8db1656cdfd3d9dcbdbf360b8274dea76f0b2c2c" + integrity sha512-FZhWq6hWWZBP76aZ7bkrfzTMP31CCefVIImrwP3giPLcoXocmLTmr92NLZxuIcTL4GTEOE33jQMWy9PwelL+yQ== + dependencies: + "@types/json-schema" "^7.0.3" + "@typescript-eslint/typescript-estree" "2.10.0" + eslint-scope "^5.0.0" + "@typescript-eslint/parser@^1.5.0": version "1.13.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-1.13.0.tgz#61ac7811ea52791c47dc9fd4dd4a184fae9ac355" @@ -1592,6 +1601,16 @@ "@typescript-eslint/typescript-estree" "1.13.0" eslint-visitor-keys "^1.0.0" +"@typescript-eslint/parser@^2.10.0": + version "2.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.10.0.tgz#24b2e48384ab6d5a6121e4c4faf8892c79657ad3" + integrity sha512-wQNiBokcP5ZsTuB+i4BlmVWq6o+oAhd8en2eSm/EE9m7BgZUIfEeYFd6z3S+T7bgNuloeiHA1/cevvbBDLr98g== + dependencies: + "@types/eslint-visitor-keys" "^1.0.0" + "@typescript-eslint/experimental-utils" "2.10.0" + "@typescript-eslint/typescript-estree" "2.10.0" + eslint-visitor-keys "^1.1.0" + "@typescript-eslint/typescript-estree@1.13.0": version "1.13.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-1.13.0.tgz#8140f17d0f60c03619798f1d628b8434913dc32e" @@ -1600,6 +1619,19 @@ lodash.unescape "4.0.1" semver "5.5.0" +"@typescript-eslint/typescript-estree@2.10.0": + version "2.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.10.0.tgz#89cdabd5e8c774e9d590588cb42fb9afd14dcbd9" + integrity sha512-oOYnplddQNm/LGVkqbkAwx4TIBuuZ36cAQq9v3nFIU9FmhemHuVzAesMSXNQDdAzCa5bFgCrfD3JWhYVKlRN2g== + dependencies: + debug "^4.1.1" + eslint-visitor-keys "^1.1.0" + glob "^7.1.6" + is-glob "^4.0.1" + lodash.unescape "4.0.1" + semver "^6.3.0" + tsutils "^3.17.1" + abab@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.2.tgz#a2fba1b122c69a85caa02d10f9270c7219709a9d" @@ -3578,6 +3610,14 @@ eslint-scope@^4.0.0, eslint-scope@^4.0.3: esrecurse "^4.1.0" estraverse "^4.1.1" +eslint-scope@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9" + integrity sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw== + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + eslint-utils@^1.3.1: version "1.4.2" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.2.tgz#166a5180ef6ab7eb462f162fd0e6f2463d7309ab" @@ -3585,7 +3625,7 @@ eslint-utils@^1.3.1: dependencies: eslint-visitor-keys "^1.0.0" -eslint-visitor-keys@^1.0.0: +eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== @@ -4338,6 +4378,18 @@ glob@^7.1.1, glob@^7.1.2, glob@^7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.1.6: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + globals@^11.0.1, globals@^11.1.0, globals@^11.7.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" @@ -4902,7 +4954,7 @@ is-generator-fn@^2.0.0: resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== -is-glob@^4.0.0: +is-glob@^4.0.0, is-glob@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== @@ -8411,7 +8463,7 @@ semver@5.5.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" integrity sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA== -semver@^6.0.0, semver@^6.2.0: +semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -9182,7 +9234,7 @@ tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== -tsutils@^3.7.0: +tsutils@^3.17.1, tsutils@^3.7.0: version "3.17.1" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759" integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g== From 2b94ba1eb654109edde19978033b11364fb49a40 Mon Sep 17 00:00:00 2001 From: feruz Date: Tue, 3 Dec 2019 16:07:39 +0200 Subject: [PATCH 08/15] rm pack --- package.json | 1 - yarn.lock | 60 ++++------------------------------------------------ 2 files changed, 4 insertions(+), 57 deletions(-) diff --git a/package.json b/package.json index c00e0480e..03ecbcbb8 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,6 @@ "@babel/core": "^7.6.2", "@babel/runtime": "^7.6.2", "@react-native-community/eslint-config": "^0.0.5", - "@typescript-eslint/parser": "^2.10.0", "babel-eslint": "^10.0.1", "babel-jest": "^24.9.0", "babel-preset-react-native": "~5.0.2", diff --git a/yarn.lock b/yarn.lock index 070e39575..c0d20ea2f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1582,15 +1582,6 @@ "@typescript-eslint/typescript-estree" "1.13.0" eslint-scope "^4.0.0" -"@typescript-eslint/experimental-utils@2.10.0": - version "2.10.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.10.0.tgz#8db1656cdfd3d9dcbdbf360b8274dea76f0b2c2c" - integrity sha512-FZhWq6hWWZBP76aZ7bkrfzTMP31CCefVIImrwP3giPLcoXocmLTmr92NLZxuIcTL4GTEOE33jQMWy9PwelL+yQ== - dependencies: - "@types/json-schema" "^7.0.3" - "@typescript-eslint/typescript-estree" "2.10.0" - eslint-scope "^5.0.0" - "@typescript-eslint/parser@^1.5.0": version "1.13.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-1.13.0.tgz#61ac7811ea52791c47dc9fd4dd4a184fae9ac355" @@ -1601,16 +1592,6 @@ "@typescript-eslint/typescript-estree" "1.13.0" eslint-visitor-keys "^1.0.0" -"@typescript-eslint/parser@^2.10.0": - version "2.10.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.10.0.tgz#24b2e48384ab6d5a6121e4c4faf8892c79657ad3" - integrity sha512-wQNiBokcP5ZsTuB+i4BlmVWq6o+oAhd8en2eSm/EE9m7BgZUIfEeYFd6z3S+T7bgNuloeiHA1/cevvbBDLr98g== - dependencies: - "@types/eslint-visitor-keys" "^1.0.0" - "@typescript-eslint/experimental-utils" "2.10.0" - "@typescript-eslint/typescript-estree" "2.10.0" - eslint-visitor-keys "^1.1.0" - "@typescript-eslint/typescript-estree@1.13.0": version "1.13.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-1.13.0.tgz#8140f17d0f60c03619798f1d628b8434913dc32e" @@ -1619,19 +1600,6 @@ lodash.unescape "4.0.1" semver "5.5.0" -"@typescript-eslint/typescript-estree@2.10.0": - version "2.10.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.10.0.tgz#89cdabd5e8c774e9d590588cb42fb9afd14dcbd9" - integrity sha512-oOYnplddQNm/LGVkqbkAwx4TIBuuZ36cAQq9v3nFIU9FmhemHuVzAesMSXNQDdAzCa5bFgCrfD3JWhYVKlRN2g== - dependencies: - debug "^4.1.1" - eslint-visitor-keys "^1.1.0" - glob "^7.1.6" - is-glob "^4.0.1" - lodash.unescape "4.0.1" - semver "^6.3.0" - tsutils "^3.17.1" - abab@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.2.tgz#a2fba1b122c69a85caa02d10f9270c7219709a9d" @@ -3610,14 +3578,6 @@ eslint-scope@^4.0.0, eslint-scope@^4.0.3: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-scope@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9" - integrity sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw== - dependencies: - esrecurse "^4.1.0" - estraverse "^4.1.1" - eslint-utils@^1.3.1: version "1.4.2" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.2.tgz#166a5180ef6ab7eb462f162fd0e6f2463d7309ab" @@ -3625,7 +3585,7 @@ eslint-utils@^1.3.1: dependencies: eslint-visitor-keys "^1.0.0" -eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: +eslint-visitor-keys@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== @@ -4378,18 +4338,6 @@ glob@^7.1.1, glob@^7.1.2, glob@^7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.1.6: - version "7.1.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" - integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - globals@^11.0.1, globals@^11.1.0, globals@^11.7.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" @@ -4954,7 +4902,7 @@ is-generator-fn@^2.0.0: resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== -is-glob@^4.0.0, is-glob@^4.0.1: +is-glob@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== @@ -8463,7 +8411,7 @@ semver@5.5.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" integrity sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA== -semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: +semver@^6.0.0, semver@^6.2.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -9234,7 +9182,7 @@ tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== -tsutils@^3.17.1, tsutils@^3.7.0: +tsutils@^3.7.0: version "3.17.1" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759" integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g== From 2a7260865404507401c828a5786a67cec2aaaf79 Mon Sep 17 00:00:00 2001 From: feruz Date: Tue, 3 Dec 2019 19:45:00 +0200 Subject: [PATCH 09/15] fix voters page filterbar --- src/containers/accountListContainer.js | 13 +++++++------ src/screens/voters/screen/votersScreen.js | 7 +++++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/containers/accountListContainer.js b/src/containers/accountListContainer.js index 4d83cefad..4ce8d6c38 100644 --- a/src/containers/accountListContainer.js +++ b/src/containers/accountListContainer.js @@ -15,7 +15,7 @@ class AccountListContainer extends Component { this.state = { data: props.data, filterResult: null, - filterIndex: '0', + filterIndex: 0, }; } @@ -33,7 +33,7 @@ class AccountListContainer extends Component { return itemName.indexOf(_text) > -1; }); - if (filterIndex !== '0') { + if (filterIndex !== 0) { this._handleOnVotersDropdownSelect(filterIndex, '', newData); } else { this.setState({ filterResult: newData }); @@ -45,13 +45,13 @@ class AccountListContainer extends Component { const _data = Object.assign([], oldData || data); switch (index) { - case '0': + case 0: _data.sort((a, b) => Number(b.value) - Number(a.value)); break; - case '1': + case 1: _data.sort((a, b) => b.percent - a.percent); break; - case '2': + case 2: _data.sort((a, b) => (isBefore(a.time, b.time) ? 1 : -1)); break; default: @@ -74,7 +74,7 @@ class AccountListContainer extends Component { }; render() { - const { data, filterResult } = this.state; + const { data, filterResult, filterIndex } = this.state; const { children } = this.props; return ( @@ -82,6 +82,7 @@ class AccountListContainer extends Component { children({ data, filterResult, + filterIndex, handleOnVotersDropdownSelect: this._handleOnVotersDropdownSelect, handleSearch: this._handleSearch, handleOnUserPress: this._handleOnUserPress, diff --git a/src/screens/voters/screen/votersScreen.js b/src/screens/voters/screen/votersScreen.js index 14229ef31..353fbfd3a 100644 --- a/src/screens/voters/screen/votersScreen.js +++ b/src/screens/voters/screen/votersScreen.js @@ -23,7 +23,7 @@ const VotersScreen = ({ navigation }) => { return ( - {({ data, filterResult, handleOnVotersDropdownSelect, handleSearch }) => ( + {({ data, filterResult, filterIndex, handleOnVotersDropdownSelect, handleSearch }) => ( { id: `voters_dropdown.${item}`, }), )} - defaultText={intl.formatMessage({ id: `voters_dropdown.${filterOptions[0]}` })} + defaultText={intl.formatMessage({ + id: `voters_dropdown.${filterOptions[filterIndex]}`, + })} + selectedOptionIndex={filterIndex} onDropdownSelect={handleOnVotersDropdownSelect} /> From b78dfb024b13e30c579eddaabe57ca435de3514b Mon Sep 17 00:00:00 2001 From: feruz Date: Wed, 4 Dec 2019 11:23:17 +0200 Subject: [PATCH 10/15] filterbar style fixes --- .../UserInterfaceState.xcuserstate | Bin 29364 -> 29849 bytes .../basicUIElements/view/tag/tagStyles.js | 5 +++-- .../filterBar/view/filterBarStyles.js | 11 ++++++++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ios/eSteem.xcworkspace/xcuserdata/f.xcuserdatad/UserInterfaceState.xcuserstate b/ios/eSteem.xcworkspace/xcuserdata/f.xcuserdatad/UserInterfaceState.xcuserstate index 1009512d5977eff06cda59b8dc5957bd4d379b01..be467cd64476da7325cabd052411bbd89a51bf85 100644 GIT binary patch delta 14936 zcmZ`<2V7Iv8o%eey<-}TI9kHI+Kx`y75u1sv z#BO2_v6nbVd_^1~ju9t_v&2Q>N8%^qSK>F~HgSizOZ-hdB%Tt_iI;!?6z~NC5CB3! z7>EQ>AQr@dL>EwkbdUiuK^Djc1)vZVfwrI>=m@%j?w}7C2nK<2Pz`FpNH7Y#4JH5% z%mTB)955HW3wW>)tOgsv7VsI^4n7CFzbOd1sB1O;3semTnE2{8{iLc z8{7f+!2|FRJO%$iALt8R0w{!j&>sfCSQrQ8FdinrM3@AVp#o~54yMBlmg54MAy zpc9tC0dOE31k2%II0RO}N;n?A4JW{f&;=3X;CpaB7MKPGF*I&u}cnp{V&CpVK@NY`iNcJd2y7rB?*M;;;%lgG%f$&=(M z@*H`dyhMISULk)be<6P-Z;-diJLE(15&44rhy0hKD4O!3yeWSwfC{C;CVWYlp074qN=EBs)ia#jdf8IDHnyP>C_Br zCN+ziP0gbgQA??MY6Z2P+CXij9#BuHr_?{xzci#tnx$LO-n0+xNBh$vI+zZpBWMX7 zO~=x4bRwNZr_d@|N9*Y{I-Sm@O|*@+(|L40-Ii`gccP2wZgh9LH{FLWq5IPV=z+9r z2tAY@PLH5R(xd2c^my7uBYFxwm7YP*r03G_(mee>{UQAky^LN?ub|h{o9V6e4tfv0 zmp)8?MSo47rq9#g(m&Cc>EGyU^iBE}eV2YjzhDT4VOlfZj6V~?L@+T-Jd?mE7%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Pf$fp)wH?|iyN_LH7ujX@ zD0_@O&Yoab+SBZrc9Y#|&#~v)JJ<{DUG3fN!|WCIN_&-kl)c72)jq>M+dj|!o_(Qx zg?+WX&c4?Ex&2G~Ui&_~^ML)Z{fzx5`_J|Z_KWt*_WSmS_DA-=a|Y&A=S;{!Ig@jy z=FG@>FX#Q7B{@rTR^+V8`6B0vgK@+-)DEq~;4nH&jyy+!qm84Tql2T9qnBflW0<4D zQRNup80(nea5|~kD({NT9Zxb3*-bUbwY>3HmT=6LCN zoeOg%xq-RCxuLnT+^F1`+_>DtTvcvTZd$HAw@+?G?zG(Hx!ZHU$-R>MG_O@&>%2~R zJ@QKOD)L6>jm?{ohw`T7&CHvVH$U&ayhC}H@}A|xe4l(_zJIsr;YwFXi9J|11AR{;L8|Koxiu_!jsThzq0zvVzEh z*aAaAMnQIgr2zjgih_0p9Sb@abS>ytP+Ty$U{t|`0#q=$U~0jfg82n}!J>jC1+Ib* z3$_>aDe6~LR#a0ozQ|cLsc1^k^rBfsONy2itteVuR9CdNXnoO!iACQP{aGAVoLk(X zxO;I?asT3B#nr_%#nX#t7W2i6ikB2GEnZ)|v3PUw*5Vz-yNbUo-dFr}@xkJ6i@z&A zRs3`D{o;qke-=M3epdXV_*Dr}LY6QkEla#g0!xBRLQ7 Date: Wed, 4 Dec 2019 15:07:04 +0200 Subject: [PATCH 11/15] icon change --- src/components/notification/view/notificationView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/notification/view/notificationView.js b/src/components/notification/view/notificationView.js index a25dd9b0f..033cd5bda 100644 --- a/src/components/notification/view/notificationView.js +++ b/src/components/notification/view/notificationView.js @@ -169,7 +169,7 @@ class NotificationView extends PureComponent { options={filters.map(item => item.value)} defaultText="ALL" onDropdownSelect={this._handleOnDropdownSelect} - rightIconName="check" + rightIconName="playlist-add-check" rightIconType="MaterialIcons" selectedOptionIndex={selectedIndex} onRightIconPress={readAllNotification} From d5a1d80cc7e38a1e0e58b55137e4ec4be5c3410b Mon Sep 17 00:00:00 2001 From: feruz Date: Wed, 4 Dec 2019 15:32:48 +0200 Subject: [PATCH 12/15] icon badge border remove --- src/components/icon/view/iconStyles.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/icon/view/iconStyles.js b/src/components/icon/view/iconStyles.js index 3a03f1a76..e06b1a6e9 100644 --- a/src/components/icon/view/iconStyles.js +++ b/src/components/icon/view/iconStyles.js @@ -12,8 +12,7 @@ export default EStyleSheet.create({ right: 10, top: 13, backgroundColor: '$primaryRed', - borderColor: '$white', - borderWidth: 2, + borderWidth: 0, justifyContent: 'center', alignItems: 'center', zIndex: 99, From 8803d14226a0f6c1be5e9b5fc2bf929a61bdb7d0 Mon Sep 17 00:00:00 2001 From: feruz Date: Wed, 4 Dec 2019 15:50:59 +0200 Subject: [PATCH 13/15] react-navigation-tabs 2.5.5->2.6.2 --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 03ecbcbb8..012b3ec44 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "react-navigation-drawer": "^2.2.2", "react-navigation-redux-helpers": "^2.0.8", "react-navigation-stack": "^1.9.3", - "react-navigation-tabs": "^2.5.5", + "react-navigation-tabs": "^2.6.2", "react-redux": "^7.1.1", "redux": "^4.0.4", "redux-persist": "^6.0.0", diff --git a/yarn.lock b/yarn.lock index c0d20ea2f..519b5427d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7713,10 +7713,10 @@ react-native-swiper@^1.6.0-rc.3: dependencies: prop-types "^15.5.10" -react-native-tab-view@^2.9.0: - version "2.10.0" - resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-2.10.0.tgz#5e249e5650502010013449ffd4e5edc18a95364b" - integrity sha512-qgexVz5eO4yaFjdkmn/sURXgVvaBo6pZD/q1eoca96SbPVbaH3WzVhF3bRUfeTHwZkXwznFTpS3JURqIFU8vQA== +react-native-tab-view@^2.11.0: + version "2.11.0" + resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-2.11.0.tgz#2e57d1f617ccc88c7f452708804f3409f880b700" + integrity sha512-vqetlxGO7A8bnqvXcB50MWpRZAImXFrDGz1WCQKdCqe03Ey3ZzENe7yLuWrtBJYlepGfOLAsmCXv+wW82Yfm1w== react-native-vector-icons@^6.6.0: version "6.6.0" @@ -7813,15 +7813,15 @@ react-navigation-stack@^1.9.3: dependencies: prop-types "^15.7.2" -react-navigation-tabs@^2.5.5: - version "2.5.5" - resolved "https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-2.5.5.tgz#f651355b140b35ef5753aac434da5e1943abdd26" - integrity sha512-oIL5V4agCxcqbWNZzF1h/cm1bxKXNUeGrWaRQEEnuN3TXTEj1SVRz33CnKYg30pVvgF5L2p28sOk15Z4Ao01NQ== +react-navigation-tabs@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-2.6.2.tgz#6611f3bbc5fcbc004a96a457e1dbe8d957d09ef5" + integrity sha512-b7Bwio3pOyb2dJOsfICm1eXUCekULO63VitLlkslsuwB5v5qXD9u+TkuSGADPiAybRH3Fts4cQX/xA5WGsIsfg== dependencies: hoist-non-react-statics "^3.3.0" react-lifecycles-compat "^3.0.4" react-native-safe-area-view "^0.14.6" - react-native-tab-view "^2.9.0" + react-native-tab-view "^2.11.0" react-navigation@^4.0.10: version "4.0.10" From 37dcf753a79fc1a22df2637387ad5f53970bef46 Mon Sep 17 00:00:00 2001 From: feruz Date: Thu, 5 Dec 2019 04:52:38 +0200 Subject: [PATCH 14/15] bottom bar small fix --- src/components/bottomTabBar/view/bottomTabBarStyles.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/bottomTabBar/view/bottomTabBarStyles.js b/src/components/bottomTabBar/view/bottomTabBarStyles.js index be73eeab6..08b070f3f 100644 --- a/src/components/bottomTabBar/view/bottomTabBarStyles.js +++ b/src/components/bottomTabBar/view/bottomTabBarStyles.js @@ -22,7 +22,8 @@ export default EStyleSheet.create({ navItem: { alignItems: 'center', zIndex: 0, - padding: 20, + paddingBottom: 20, + paddingRight: 3, width: (deviceWidth - 38) / 5, }, circle: { From 7815b77144faf64a75032eec22c28789b7a14efe Mon Sep 17 00:00:00 2001 From: feruz Date: Thu, 5 Dec 2019 05:16:12 +0200 Subject: [PATCH 15/15] small hack, todo: find better way --- src/components/bottomTabBar/view/bottomTabBarStyles.js | 9 ++++++++- src/components/bottomTabBar/view/tabbar.js | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/components/bottomTabBar/view/bottomTabBarStyles.js b/src/components/bottomTabBar/view/bottomTabBarStyles.js index 08b070f3f..d0cd5a927 100644 --- a/src/components/bottomTabBar/view/bottomTabBarStyles.js +++ b/src/components/bottomTabBar/view/bottomTabBarStyles.js @@ -23,9 +23,16 @@ export default EStyleSheet.create({ alignItems: 'center', zIndex: 0, paddingBottom: 20, - paddingRight: 3, width: (deviceWidth - 38) / 5, }, + navItem2: { + paddingRight: 5, + paddingLeft: 2, + }, + navItem3: { + paddingRight: 0, + paddingLeft: 2, + }, circle: { bottom: 25, }, diff --git a/src/components/bottomTabBar/view/tabbar.js b/src/components/bottomTabBar/view/tabbar.js index 90f5aec06..0804c1f45 100644 --- a/src/components/bottomTabBar/view/tabbar.js +++ b/src/components/bottomTabBar/view/tabbar.js @@ -144,7 +144,14 @@ const TabBarItem = ({ icon, selectedIcon, index, selected, onPress, showIcon, di if (selected) { if (showIcon) { return ( - + {selectedIcon || icon} );