From df97465b1789e97657ac79f9d38f264615f591bb Mon Sep 17 00:00:00 2001 From: feruz Date: Fri, 29 Nov 2019 15:59:27 +0200 Subject: [PATCH 1/4] filter coloring change and SBD addition --- .../UserInterfaceState.xcuserstate | Bin 25224 -> 28819 bytes .../view/placeHolder/boostPlaceHolderView.js | 2 +- .../basicUIElements/view/tag/tagStyles.js | 2 +- .../tagArea/view/tagAreaView.js | 5 +- src/config/locales/en-US.json | 9 ++- src/navigation/baseNavigator.js | 2 +- src/screens/feed/screen/feedScreen.js | 2 +- src/screens/wallet/screen/sbdView.js | 60 ++++++++++++++++++ src/screens/wallet/screen/steemView.js | 56 ++++++++-------- src/screens/wallet/screen/walletScreen.js | 9 ++- 10 files changed, 112 insertions(+), 35 deletions(-) create mode 100644 src/screens/wallet/screen/sbdView.js diff --git a/ios/eSteem.xcworkspace/xcuserdata/f.xcuserdatad/UserInterfaceState.xcuserstate b/ios/eSteem.xcworkspace/xcuserdata/f.xcuserdatad/UserInterfaceState.xcuserstate index eedbc84d34ba7f27bbbab60db231356b2de88b0f..42f422a04dafebdbd3bad597c7ec08830092eefe 100644 GIT binary patch delta 15208 zcmbVy2Y8d!_y2qEI|6hhZJIRQY0}-K%^q#`YT2V~kfuO|0;N#Ol9Bs@EZKx5yJZRr zG8GXOK^ZCt$VLgT1;$7lB zVl%OYc%Rr#>?J-SJ|*@OUlIq2!^Ahl3F0(yk@%jtLR=;85Wf+>6L*OR#6#jA;u#jN^N02*KecHjU`-~#PHd(Z)tfR3OGcn$OdeLy7`4649r z@CFzI#)1i8BA5c^f_cCX=7R;`ZLl1?2eyL`!N*`P*atobUxI_+8*mgH2PeQ;a1NXY z7r;gEBe)9w0QbOs@BsV?{(?RSxFd3#mG0cE6sDe7^fKKRw zZs>tUuo!lQ-C%dv1NMZk!CtTo_J;jo1snhe!bxy4oC2r9Y49yL9nOF=;Vd{C&LO^q zez*|64OhZda5dZn--YkN?Ql2T4-ddE;4%2E4<3gX;6?a7yaKPnNAMr`7(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j&Mb4>G13rq`5OH9j68%=vn`%RykzBU~(9W#Azx@UT57Mf$tX0y%g zG^d+0%`MD*%tOp?nM=*X%$4Sm=K1F3=2hlubFF!g`D62b^C#v5=7Z*w=I_kkn=hNM znQxdMnEy0CGCwvyH9xl~E%6qECD~%MSS&V=rK_d4rLU#GWq@UrWvpeKWxR!2CRyfM zyq1NQRhDW?t>rz-PRlOK9?M?KKFeXtQOgO-Da#qlS<4m6b<59|Uo6k8z>2Kc8enZ^ zm0QEDk=7_{v^BptsA>vz`gt!J(0trxAoTJKozTmP{BWqo9m*fh2n zTbwPymS{`1rP(rVEp6Gh*0#2`uC_c|Pg^frsco2TxUJGQ$~M+E%{Id}%Qn~MwJo%* zvQ^vG+Sc1XwtZsz%yz(b&|^Df`_6XOcHVZ;cG-5-_RJn=53!5v61&VEX4l!{?FM_Y zJ=Jcqce3}k_qF%853~=m53vukSK3F}$Jl4v=h?mX1@^`EW%dpB&GxPKUG_cpz4k-) zZ|ukH-`Y>x&)6^7ui9_ef3`odKX(8Jba0L)4yhx|p>(Jm9*slmNOYt)Ob&~qt)qjZ zlcTevt0T`*;3#wqcD(5r>L_!Jb4+kh$0WyJPUH-73Y?)%sWZ%}amF~~oO)-XGuheR zS?*lm-09rs{M7lm^PuyX^LytH&hyS6otKs{A-uAQ#k zu8&+FyY{;dxlXx$b3IR!r5Vy%r1eZIPn(*yB<)<BUeGc;408Ih^ZjLy_$#$~2v+A~|^#pfmD+4HjVTIaRP z>zLQYlh-ZJoi`w_C~t7yn|VX?%JPQg4bNMWw?FTuJJhXoYu$+%w!W-Lu_`-Amld+_mmK?!E4P?oZqY+y~u<+=tyq h-6!0q+~2vcy05!`@~3hL`9A|fTh`}x{!jNW{|_eW>b3v? diff --git a/src/components/basicUIElements/view/placeHolder/boostPlaceHolderView.js b/src/components/basicUIElements/view/placeHolder/boostPlaceHolderView.js index 2bf401d72..35b228cbc 100644 --- a/src/components/basicUIElements/view/placeHolder/boostPlaceHolderView.js +++ b/src/components/basicUIElements/view/placeHolder/boostPlaceHolderView.js @@ -20,7 +20,7 @@ const BoostPlaceHolder = () => { {({ isDarkTheme }) => { const color = isDarkTheme ? '#2e3d51' : '#f5f5f5'; return ( - + diff --git a/src/components/basicUIElements/view/tag/tagStyles.js b/src/components/basicUIElements/view/tag/tagStyles.js index 756e06879..c15ac0165 100644 --- a/src/components/basicUIElements/view/tag/tagStyles.js +++ b/src/components/basicUIElements/view/tag/tagStyles.js @@ -25,7 +25,7 @@ export default EStyleSheet.create({ backgroundColor: 'transparent' }, isFilterTextUnPin: { - color: '$primaryDarkBlue', + color: '$primaryDarkGray', fontSize: 14, }, isFilterTextPin: { diff --git a/src/components/editorElements/tagArea/view/tagAreaView.js b/src/components/editorElements/tagArea/view/tagAreaView.js index 1aa126a9e..c483ab277 100644 --- a/src/components/editorElements/tagArea/view/tagAreaView.js +++ b/src/components/editorElements/tagArea/view/tagAreaView.js @@ -42,11 +42,14 @@ export default class TagAreaView extends Component { // Component Functions _handleOnChange = (text, i) => { - this.setState({ currentText: text.replace(/\s/g, '') }); + this.setState({ currentText: text.replace(/\s/g, '').replace(/,/g, '') }); if (text.indexOf(' ') > 0 && text) { this._handleTagAdded(); } + if (text.indexOf(',') > 0 && text) { + this._handleTagAdded(); + } if (!text) { this._handleTagRemove(i); diff --git a/src/config/locales/en-US.json b/src/config/locales/en-US.json index 6f9942485..12c28a4cb 100644 --- a/src/config/locales/en-US.json +++ b/src/config/locales/en-US.json @@ -69,13 +69,20 @@ "title": "eSteem Points", "buy": "GET ESTM" }, - "saving": { + "savingsteem": { "title": "STEEM Savings" }, + "savingsbd": { + "title": "SBD Savings" + }, "steem": { "title": "STEEM", "buy": "GET STEEM" }, + "sbd": { + "title": "SBD", + "buy": "GET SBD" + }, "steem_power": { "title": "STEEM POWER" } diff --git a/src/navigation/baseNavigator.js b/src/navigation/baseNavigator.js index ccebc1a68..c3681c7f9 100644 --- a/src/navigation/baseNavigator.js +++ b/src/navigation/baseNavigator.js @@ -44,7 +44,7 @@ const BaseNavigator = createBottomTabNavigator( screen: Wallet, navigationOptions: () => ({ tabBarIcon: ({ tintColor }) => ( - + ), }), }, diff --git a/src/screens/feed/screen/feedScreen.js b/src/screens/feed/screen/feedScreen.js index 73cad4528..e047a80df 100644 --- a/src/screens/feed/screen/feedScreen.js +++ b/src/screens/feed/screen/feedScreen.js @@ -29,7 +29,7 @@ const FeedScreen = () => { filterOptions={[...POPULAR_FILTERS]} filterOptionsValue={[...POPULAR_FILTERS_VALUE]} getFor={isLoggedIn ? 'feed' : 'trending'} - selectedOptionIndex={isLoggedIn ? 1 : 2} + selectedOptionIndex={isLoggedIn ? 0 : 2} tag={get(currentAccount, 'name')} /> diff --git a/src/screens/wallet/screen/sbdView.js b/src/screens/wallet/screen/sbdView.js new file mode 100644 index 000000000..e6394c251 --- /dev/null +++ b/src/screens/wallet/screen/sbdView.js @@ -0,0 +1,60 @@ +import React from 'react'; +import { View } from 'react-native'; + +import { WalletHeader, FormatedCurrency } from '../../../components'; +import { SteemWalletContainer, AccountContainer } from '../../../containers'; + +import globalStyles from '../../../globalStyles'; + +const SbdView = ({ handleOnSelected, index, currentIndex }) => ( + + + {({ currentAccount }) => ( + + {({ + isClaiming, + claimRewardBalance, + handleOnWalletRefresh, + refreshing, + transferHistory, + sbdBalance, + isLoading, + sbdSavingBalance, + estimatedValue, + sbdDropdown, + savingSbdDropdown, + navigate, + }) => ( + handleOnSelected(transferHistory, isLoading)} + index={index} + claim={claimRewardBalance} + fetchUserActivity={handleOnWalletRefresh} + isClaiming={isClaiming} + isLoading={isLoading} + refreshing={refreshing} + unclaimedBalance={0} + userBalance={[ + { balance: sbdBalance, nameKey: 'sbd', options: sbdDropdown }, + { balance: sbdSavingBalance, nameKey: 'savingsbd', options: savingSbdDropdown }, + ]} + handleOnDropdownSelected={option => navigate(option, 'SBD')} + type="sbd" + currentIndex={currentIndex} + showIconList={false} + valueDescriptions={[ + { + textKey: 'estimated_value', + value: , + subTextKey: 'estimated_value_desc', + }, + ]} + /> + )} + + )} + + +); + +export default SbdView; diff --git a/src/screens/wallet/screen/steemView.js b/src/screens/wallet/screen/steemView.js index 482e3cc79..e69bba18a 100644 --- a/src/screens/wallet/screen/steemView.js +++ b/src/screens/wallet/screen/steemView.js @@ -6,7 +6,7 @@ import { SteemWalletContainer, AccountContainer } from '../../../containers'; import globalStyles from '../../../globalStyles'; -const SteeemView = ({ handleOnSelected, index, currentIndex }) => ( +const SteemView = ({ handleOnSelected, index, currentIndex }) => ( {({ currentAccount }) => ( @@ -25,36 +25,36 @@ const SteeemView = ({ handleOnSelected, index, currentIndex }) => ( savingSteemDropdown, navigate, }) => ( - handleOnSelected(transferHistory, isLoading)} - index={index} - claim={claimRewardBalance} - fetchUserActivity={handleOnWalletRefresh} - isClaiming={isClaiming} - isLoading={isLoading} - refreshing={refreshing} - unclaimedBalance={0} - userBalance={[ - { balance: steemBalance, nameKey: 'steem', options: steemDropdown }, - { balance: steemSavingBalance, nameKey: 'saving', options: savingSteemDropdown }, - ]} - handleOnDropdownSelected={option => navigate(option, 'STEEM')} - type="steem" - currentIndex={currentIndex} - showIconList={false} - valueDescriptions={[ - { - textKey: 'estimated_value', - value: , - subTextKey: 'estimated_value_desc', - }, - ]} - /> - )} + handleOnSelected(transferHistory, isLoading)} + index={index} + claim={claimRewardBalance} + fetchUserActivity={handleOnWalletRefresh} + isClaiming={isClaiming} + isLoading={isLoading} + refreshing={refreshing} + unclaimedBalance={0} + userBalance={[ + { balance: steemBalance, nameKey: 'steem', options: steemDropdown }, + { balance: steemSavingBalance, nameKey: 'savingsteem', options: savingSteemDropdown }, + ]} + handleOnDropdownSelected={option => navigate(option, 'STEEM')} + type="steem" + currentIndex={currentIndex} + showIconList={false} + valueDescriptions={[ + { + textKey: 'estimated_value', + value: , + subTextKey: 'estimated_value_desc', + }, + ]} + /> + )} )} ); -export default SteeemView; +export default SteemView; diff --git a/src/screens/wallet/screen/walletScreen.js b/src/screens/wallet/screen/walletScreen.js index bb71a9f0d..0229d28c2 100644 --- a/src/screens/wallet/screen/walletScreen.js +++ b/src/screens/wallet/screen/walletScreen.js @@ -10,6 +10,7 @@ import { Header, Transaction } from '../../../components'; import EstmView from './estmView'; import SteemView from './steemView'; import SpView from './spView'; +import SbdView from './sbdView'; // Styles import globalStyles from '../../../globalStyles'; @@ -50,8 +51,14 @@ const WalletScreen = () => { refreshing={refreshing} currentIndex={currentIndex} /> - + Date: Fri, 29 Nov 2019 16:01:49 +0200 Subject: [PATCH 2/4] rm unnecessary string addition --- .../basicUIElements/view/placeHolder/boostPlaceHolderView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/basicUIElements/view/placeHolder/boostPlaceHolderView.js b/src/components/basicUIElements/view/placeHolder/boostPlaceHolderView.js index 35b228cbc..2bf401d72 100644 --- a/src/components/basicUIElements/view/placeHolder/boostPlaceHolderView.js +++ b/src/components/basicUIElements/view/placeHolder/boostPlaceHolderView.js @@ -20,7 +20,7 @@ const BoostPlaceHolder = () => { {({ isDarkTheme }) => { const color = isDarkTheme ? '#2e3d51' : '#f5f5f5'; return ( - + From 8dc41627acc551c5586a7a3420372403d3d12b80 Mon Sep 17 00:00:00 2001 From: feruz Date: Fri, 29 Nov 2019 16:10:43 +0200 Subject: [PATCH 3/4] esl --- .eslintrc.json | 39 +++++++++++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 6b7b524e9..2131d41af 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -13,20 +13,43 @@ "jest": true, "react-native/react-native": true }, - "plugins": ["react", "react-native", "jsx-a11y", "import", "prettier", "jest", "eslint-comments"], + "plugins": [ + "react", + "react-native", + "jsx-a11y", + "import", + "prettier", + "jest", + "eslint-comments" + ], "rules": { "react/jsx-filename-extension": [ 2, { - "extensions": [".js", ".jsx"] + "extensions": [ + ".js", + ".jsx" + ] } ], - "max-len": ["error", 100], - "react/forbid-prop-types": [0], + "max-len": [ + "error", + 100 + ], + "react/forbid-prop-types": [ + 0 + ], "no-underscore-dangle": 0, - "react/require-default-props": [0], - "global-require": [0], - "func-names": ["error", "as-needed"], + "react/require-default-props": [ + 0 + ], + "global-require": [ + 0 + ], + "func-names": [ + "error", + "as-needed" + ], "linebreak-style": 0, "no-use-before-define": "off", "import/prefer-default-export": "off", @@ -36,4 +59,4 @@ "no-case-declarations": "off", "no-cycle": "off" } -} +} \ No newline at end of file From f18c6fac725c9b3545b6c3fcea370bf67c676f98 Mon Sep 17 00:00:00 2001 From: feruz Date: Fri, 29 Nov 2019 20:13:50 +0200 Subject: [PATCH 4/4] ran lint:fix --- .../basicHeader/view/basicHeaderView.js | 4 +- .../basicUIElements/view/tag/tagStyles.js | 2 +- .../basicUIElements/view/tag/tagView.js | 17 +++- .../view/collapsibleCardView.js | 8 +- .../comments/container/commentsContainer.js | 26 +++-- .../view/commentsDisplayView.js | 4 +- .../filterBar/view/filterBarStyles.js | 4 +- .../filterBar/view/filterBarView.js | 55 ++++++----- .../formInput/view/formInputView.js | 4 +- src/components/icon/view/iconView.js | 4 +- .../container/leaderboardContainer.js | 4 +- .../leaderboard/view/leaderboardView.js | 4 +- .../markdownEditor/view/markdownEditorView.js | 18 ++-- .../notification/view/notificationView.js | 20 +++- .../percentBar/view/percentBarView.js | 4 +- src/components/postBoost/postBoostView.js | 6 +- .../postElements/body/view/postBodyView.js | 2 +- .../postListItem/view/postListItemView.js | 4 +- .../container/postDisplayContainer.js | 4 +- src/components/posts/view/postsView.js | 2 +- .../profileSummary/view/profileSummaryView.js | 4 +- src/components/promote/promoteView.js | 4 +- src/components/scaleSlider/scaleSliderView.js | 4 +- .../container/searchModalContainer.js | 8 +- .../view/toastNotificaitonView.js | 4 +- .../toggleSwitch/view/toggleSwitchView.js | 4 +- src/constants/options/comment.js | 2 +- src/containers/profileContainer.js | 8 +- src/containers/transferContainer.js | 4 +- src/providers/steem/dsteem.js | 4 +- .../follows/container/followsContainer.js | 8 +- src/screens/login/container/loginContainer.js | 4 +- src/screens/post/container/postContainer.js | 4 +- src/screens/wallet/screen/sbdView.js | 96 +++++++++---------- src/screens/wallet/screen/steemView.js | 56 ++++++----- src/utils/authorReputation.js | 16 +++- src/utils/clipboard.js | 4 +- src/utils/conversions.js | 8 +- src/utils/editor.js | 16 +++- src/utils/formatter.js | 12 ++- src/utils/image.js | 24 +++-- src/utils/jsonUtils.js | 4 +- src/utils/manaBar.js | 8 +- src/utils/number.js | 8 +- src/utils/parseToken.js | 4 +- src/utils/reputation.js | 8 +- src/utils/settings.js | 4 +- src/utils/user.js | 12 ++- 48 files changed, 352 insertions(+), 186 deletions(-) diff --git a/src/components/basicHeader/view/basicHeaderView.js b/src/components/basicHeader/view/basicHeaderView.js index 0c19f39a7..c5c70751d 100644 --- a/src/components/basicHeader/view/basicHeaderView.js +++ b/src/components/basicHeader/view/basicHeaderView.js @@ -46,7 +46,9 @@ class BasicHeaderView extends Component { this.setState({ isInputVisible: !isInputVisible }); - if (isInputVisible) this._handleOnSearch(''); + if (isInputVisible) { + this._handleOnSearch(''); + } }; _handleOnSearch = value => { diff --git a/src/components/basicUIElements/view/tag/tagStyles.js b/src/components/basicUIElements/view/tag/tagStyles.js index c15ac0165..46a2aee25 100644 --- a/src/components/basicUIElements/view/tag/tagStyles.js +++ b/src/components/basicUIElements/view/tag/tagStyles.js @@ -22,7 +22,7 @@ export default EStyleSheet.create({ borderRadius: 50, }, isFilter: { - backgroundColor: 'transparent' + backgroundColor: 'transparent', }, isFilterTextUnPin: { color: '$primaryDarkGray', diff --git a/src/components/basicUIElements/view/tag/tagView.js b/src/components/basicUIElements/view/tag/tagView.js index 98c9f79c6..afc766b27 100644 --- a/src/components/basicUIElements/view/tag/tagView.js +++ b/src/components/basicUIElements/view/tag/tagView.js @@ -5,9 +5,22 @@ import styles from './tagStyles'; const Tag = ({ onPress, isPin, value, isPostCardTag, isFilter }) => ( onPress && onPress(value)}> - {value} + + {value} + ); diff --git a/src/components/collapsibleCard/view/collapsibleCardView.js b/src/components/collapsibleCard/view/collapsibleCardView.js index c9240e75e..981a5e9d5 100644 --- a/src/components/collapsibleCard/view/collapsibleCardView.js +++ b/src/components/collapsibleCard/view/collapsibleCardView.js @@ -51,7 +51,9 @@ class CollapsibleCardView extends PureComponent { // Component Functions _initContentHeight = event => { - if (this.anime.contentHeight > 0) return; + if (this.anime.contentHeight > 0) { + return; + } this.anime.contentHeight = event.nativeEvent.layout.height; this.anime.height.setValue(this.anime.expanded ? this._getMaxValue() : this._getMinValue()); }; @@ -72,7 +74,9 @@ class CollapsibleCardView extends PureComponent { expanded: this.anime.expanded, }); - if (handleOnExpanded && this.anime.expanded) handleOnExpanded(); + if (handleOnExpanded && this.anime.expanded) { + handleOnExpanded(); + } }; render() { diff --git a/src/components/comments/container/commentsContainer.js b/src/components/comments/container/commentsContainer.js index a1836f003..17607b756 100644 --- a/src/components/comments/container/commentsContainer.js +++ b/src/components/comments/container/commentsContainer.js @@ -85,8 +85,12 @@ class CommentsContainer extends Component { const keyA = get(a, 'author_reputation'); const keyB = get(b, 'author_reputation'); - if (keyA > keyB) return -1; - if (keyA < keyB) return 1; + if (keyA > keyB) { + return -1; + } + if (keyA < keyB) { + return 1; + } return 0; }, @@ -94,8 +98,12 @@ class CommentsContainer extends Component { const keyA = a.net_votes; const keyB = b.net_votes; - if (keyA > keyB) return -1; - if (keyA < keyB) return 1; + if (keyA > keyB) { + return -1; + } + if (keyA < keyB) { + return 1; + } return 0; }, @@ -111,8 +119,12 @@ class CommentsContainer extends Component { const keyA = Date.parse(get(a, 'created')); const keyB = Date.parse(get(b, 'created')); - if (keyA > keyB) return -1; - if (keyA < keyB) return 1; + if (keyA > keyB) { + return -1; + } + if (keyA < keyB) { + return 1; + } return 0; }, @@ -149,7 +161,7 @@ class CommentsContainer extends Component { }); } }) - .catch(() => { }); + .catch(() => {}); } }; diff --git a/src/components/commentsDisplay/view/commentsDisplayView.js b/src/components/commentsDisplay/view/commentsDisplayView.js index 69a1a0358..9370cfb29 100644 --- a/src/components/commentsDisplay/view/commentsDisplayView.js +++ b/src/components/commentsDisplay/view/commentsDisplayView.js @@ -50,7 +50,9 @@ class CommentsDisplayView extends PureComponent { dropdownIconName="arrow-drop-down" options={VALUE.map(val => intl.formatMessage({ id: `comment_filter.${val}` }))} defaultText={intl.formatMessage({ id: `comment_filter.${VALUE[0]}` })} - onDropdownSelect={selectedIndex => this._handleOnDropdownSelect(COMMENT_FILTER[selectedIndex], selectedIndex)} + onDropdownSelect={selectedIndex => + this._handleOnDropdownSelect(COMMENT_FILTER[selectedIndex], selectedIndex) + } selectedOptionIndex={selectedOptionIndex} /> diff --git a/src/components/filterBar/view/filterBarStyles.js b/src/components/filterBar/view/filterBarStyles.js index 4037ec3d7..04c3d10fc 100644 --- a/src/components/filterBar/view/filterBarStyles.js +++ b/src/components/filterBar/view/filterBarStyles.js @@ -16,7 +16,7 @@ export default EStyleSheet.create({ flexDirection: 'row', justifyContent: 'center', alignItems: 'center', - left: 15 + left: 15, }, filterBarWrapper: { flexDirection: 'row', @@ -30,5 +30,5 @@ export default EStyleSheet.create({ rightIcon: { color: '$darkIconColor', textAlign: 'center', - } + }, }); diff --git a/src/components/filterBar/view/filterBarView.js b/src/components/filterBar/view/filterBarView.js index b85ab5023..83196be4e 100644 --- a/src/components/filterBar/view/filterBarView.js +++ b/src/components/filterBar/view/filterBarView.js @@ -28,30 +28,37 @@ const FilterBarView = ({ rightIconType, selectedOptionIndex, }) => ( - - {!isHide && ( - - - - {options.map((item, index) => onDropdownSelect(index)} />)} - - {rightIconName && ( - onRightIconPress && onRightIconPress()} - style={styles.rightIconWrapper} - > - - - )} + + {!isHide && ( + + + + {options.map((item, index) => ( + onDropdownSelect(index)} + /> + ))} - - )} - - ); + {rightIconName && ( + onRightIconPress && onRightIconPress()} + style={styles.rightIconWrapper} + > + + + )} + + + )} + +); export default FilterBarView; diff --git a/src/components/formInput/view/formInputView.js b/src/components/formInput/view/formInputView.js index d2551da77..1925bf366 100644 --- a/src/components/formInput/view/formInputView.js +++ b/src/components/formInput/view/formInputView.js @@ -47,7 +47,9 @@ class FormInputView extends Component { const { onChange } = this.props; this.setState({ value }); - if (onChange) onChange(value); + if (onChange) { + onChange(value); + } }; _handleOnFocus = () => { diff --git a/src/components/icon/view/iconView.js b/src/components/icon/view/iconView.js index d1dfff954..8b2887fce 100644 --- a/src/components/icon/view/iconView.js +++ b/src/components/icon/view/iconView.js @@ -82,7 +82,9 @@ class IconView extends PureComponent { _badgeCount = '99+'; } - if (!badgeCount) return this._getIcon(); + if (!badgeCount) { + return this._getIcon(); + } return this._getIconWithBadge(_badgeCount); } diff --git a/src/components/leaderboard/container/leaderboardContainer.js b/src/components/leaderboard/container/leaderboardContainer.js index 8847df371..60d19587e 100644 --- a/src/components/leaderboard/container/leaderboardContainer.js +++ b/src/components/leaderboard/container/leaderboardContainer.js @@ -59,7 +59,9 @@ class LeaderboardContainer extends PureComponent { let users; console.log(index); - if (!isConnected) return; + if (!isConnected) { + return; + } this.setState({ refreshing: true, selectedIndex: index }); diff --git a/src/components/leaderboard/view/leaderboardView.js b/src/components/leaderboard/view/leaderboardView.js index a1e66d532..c2b9761ac 100644 --- a/src/components/leaderboard/view/leaderboardView.js +++ b/src/components/leaderboard/view/leaderboardView.js @@ -47,7 +47,9 @@ class LeaderboardView extends PureComponent { options={VALUE.map(val => intl.formatMessage({ id: `leaderboard.${val}` }))} selectedOptionIndex={selectedIndex} defaultText={intl.formatMessage({ id: `leaderboard.${VALUE[0]}` })} - onDropdownSelect={selectedIndex => fetchLeaderBoard(FILTER_OPTIONS[selectedIndex], selectedIndex)} + onDropdownSelect={selectedIndex => + fetchLeaderBoard(FILTER_OPTIONS[selectedIndex], selectedIndex) + } /> diff --git a/src/components/markdownEditor/view/markdownEditorView.js b/src/components/markdownEditor/view/markdownEditorView.js index 5bd4f5dcc..5dee2d56c 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 }); } - }, [isPreviewActive]); + }, [_setTextAndSelection, isPreviewActive, text]); useEffect(() => { if (text === '' && draftBody !== '') { _setTextAndSelection({ selection: { start: 0, end: 0 }, text: draftBody }); } - }, [draftBody]); + }, [_setTextAndSelection, draftBody, text]); useEffect(() => { if (editable === null) { @@ -63,7 +63,7 @@ const MarkdownEditorView = ({ } else { setEditable(!isLoading); } - }, [isLoading]); + }, [editable, isLoading]); useEffect(() => { if (uploadedImage && uploadedImage.url) { @@ -75,7 +75,7 @@ const MarkdownEditorView = ({ isImage: !!uploadedImage, }); } - }, [uploadedImage]); + }, [_setTextAndSelection, selection, text, uploadedImage]); useEffect(() => { setText(draftBody); @@ -91,9 +91,9 @@ const MarkdownEditorView = ({ handleIsFormValid(text); } } - }, [text]); + }, [_changeText, handleIsFormValid, text]); - const _changeText = input => { + const _changeText = useCallback(input => { setText(input); if (onChange) { @@ -107,13 +107,13 @@ const MarkdownEditorView = ({ if (handleOnTextChange) { handleOnTextChange(input); } - }; + }); const _handleOnSelectionChange = async event => { setSelection(event.nativeEvent.selection); }; - const _setTextAndSelection = ({ selection: _selection, text: _text }) => { + const _setTextAndSelection = useCallback(({ selection: _selection, text: _text }) => { inputRef.current.setNativeProps({ text: _text, }); @@ -125,7 +125,7 @@ const MarkdownEditorView = ({ setSelection(_selection); }, 200); _changeText(_text); - }; + }); const _renderPreview = () => ( diff --git a/src/components/notification/view/notificationView.js b/src/components/notification/view/notificationView.js index 3d75efcbc..2c142f968 100644 --- a/src/components/notification/view/notificationView.js +++ b/src/components/notification/view/notificationView.js @@ -85,7 +85,9 @@ class NotificationView extends PureComponent { _getNotificationsArrays = () => { const { notifications, intl } = this.props; - if (!notifications && notifications.length < 1) return null; + if (!notifications && notifications.length < 1) { + return null; + } const notificationArray = [ { @@ -130,13 +132,21 @@ class NotificationView extends PureComponent { }; _getTimeListIndex = timestamp => { - if (isToday(timestamp)) return 0; + if (isToday(timestamp)) { + return 0; + } - if (isYesterday(timestamp)) return 1; + if (isYesterday(timestamp)) { + return 1; + } - if (isThisWeek(timestamp)) return 2; + if (isThisWeek(timestamp)) { + return 2; + } - if (isThisMonth(timestamp)) return 3; + if (isThisMonth(timestamp)) { + return 3; + } return 4; }; diff --git a/src/components/percentBar/view/percentBarView.js b/src/components/percentBar/view/percentBarView.js index 8a9166238..c2ef4ec97 100644 --- a/src/components/percentBar/view/percentBarView.js +++ b/src/components/percentBar/view/percentBarView.js @@ -39,7 +39,9 @@ class PercentBarView extends PureComponent { _getText = (textColor, text, isTop, isRender) => { const { isShowText } = this.props; - if (!isShowText) return null; + if (!isShowText) { + return null; + } if (isTop === isRender && text) { return ( diff --git a/src/components/postBoost/postBoostView.js b/src/components/postBoost/postBoostView.js index 6c6abf4a8..e2b611075 100644 --- a/src/components/postBoost/postBoostView.js +++ b/src/components/postBoost/postBoostView.js @@ -252,7 +252,11 @@ class BoostPostScreen extends PureComponent { cancelButtonIndex={1} destructiveButtonIndex={0} onPress={index => { - if (index === 0) if (index === 0) this._handleOnSubmit(); + if (index === 0) { + if (index === 0) { + this._handleOnSubmit(); + } + } }} /> diff --git a/src/components/postElements/body/view/postBodyView.js b/src/components/postElements/body/view/postBodyView.js index b1f6826fd..5c36943c7 100644 --- a/src/components/postElements/body/view/postBodyView.js +++ b/src/components/postElements/body/view/postBodyView.js @@ -67,7 +67,7 @@ const PostBody = ({ default: break; } - } catch (error) { } + } catch (error) {} }; const _handleTagPress = tag => { diff --git a/src/components/postListItem/view/postListItemView.js b/src/components/postListItem/view/postListItemView.js index 9ccb19cab..c40c86c42 100644 --- a/src/components/postListItem/view/postListItemView.js +++ b/src/components/postListItem/view/postListItemView.js @@ -91,7 +91,9 @@ class PostListItemView extends Component { cancelButtonIndex={1} destructiveButtonIndex={0} onPress={index => { - if (index === 0) handleOnRemoveItem(id); + if (index === 0) { + handleOnRemoveItem(id); + } }} /> diff --git a/src/components/postView/container/postDisplayContainer.js b/src/components/postView/container/postDisplayContainer.js index fb579ad4a..128b7b14a 100644 --- a/src/components/postView/container/postDisplayContainer.js +++ b/src/components/postView/container/postDisplayContainer.js @@ -114,7 +114,9 @@ class PostDisplayContainer extends Component { _fetchPost = async () => { const { post, fetchPost } = this.props; - if (post) fetchPost(post.author, post.permlink); + if (post) { + fetchPost(post.author, post.permlink); + } }; render() { diff --git a/src/components/posts/view/postsView.js b/src/components/posts/view/postsView.js index 2c021f112..98146cc77 100644 --- a/src/components/posts/view/postsView.js +++ b/src/components/posts/view/postsView.js @@ -140,7 +140,7 @@ const PostsView = ({ setPromotedPosts(_promotedPosts); } }) - .catch(() => { }); + .catch(() => {}); }, [currentAccountUsername]); const _loadPosts = useCallback( diff --git a/src/components/profileSummary/view/profileSummaryView.js b/src/components/profileSummary/view/profileSummaryView.js index eee2092d6..41735e82e 100644 --- a/src/components/profileSummary/view/profileSummaryView.js +++ b/src/components/profileSummary/view/profileSummaryView.js @@ -46,7 +46,9 @@ class ProfileSummaryView extends PureComponent { // Component Functions _handleOnPressLink = url => { - if (url) Linking.openURL(url); + if (url) { + Linking.openURL(url); + } }; _handleOnDropdownSelect = index => { diff --git a/src/components/promote/promoteView.js b/src/components/promote/promoteView.js index 1bd3a6552..817ede2d8 100644 --- a/src/components/promote/promoteView.js +++ b/src/components/promote/promoteView.js @@ -230,7 +230,9 @@ class PromoteView extends PureComponent { cancelButtonIndex={1} destructiveButtonIndex={0} onPress={index => { - if (index === 0) this._handleOnSubmit(); + if (index === 0) { + this._handleOnSubmit(); + } }} /> { diff --git a/src/components/searchModal/container/searchModalContainer.js b/src/components/searchModal/container/searchModalContainer.js index 31975211f..34c64d0cb 100644 --- a/src/components/searchModal/container/searchModalContainer.js +++ b/src/components/searchModal/container/searchModalContainer.js @@ -43,11 +43,15 @@ class SearchModalContainer extends PureComponent { _handleOnChangeSearchInput = text => { const { isConnected } = this.props; - if (text && text.length < 2) return; + if (text && text.length < 2) { + return; + } if (this.timer) { clearTimeout(this.timer); } - if (!isConnected) return; + if (!isConnected) { + return; + } if (text && text !== '@' && text !== '#') { if (text[0] === '@') { lookupAccounts(text.substr(1)).then(res => { diff --git a/src/components/toastNotification/view/toastNotificaitonView.js b/src/components/toastNotification/view/toastNotificaitonView.js index 2ce672f39..d3df2531c 100644 --- a/src/components/toastNotification/view/toastNotificaitonView.js +++ b/src/components/toastNotification/view/toastNotificaitonView.js @@ -43,7 +43,9 @@ class ToastNotification extends Component { const { onHide } = this.props; Animated.timing(animatedValue, { toValue: 0.0, duration: 350 }).start(() => { - if (onHide) onHide(); + if (onHide) { + onHide(); + } }); if (this.closeTimer) { diff --git a/src/components/toggleSwitch/view/toggleSwitchView.js b/src/components/toggleSwitch/view/toggleSwitchView.js index cb2c8ccd9..76d1d761b 100644 --- a/src/components/toggleSwitch/view/toggleSwitchView.js +++ b/src/components/toggleSwitch/view/toggleSwitchView.js @@ -80,7 +80,9 @@ class ToggleSwitchView extends PureComponent { // For debounce setTimeout(() => { - if (onToggle) onToggle(!isOn); + if (onToggle) { + onToggle(!isOn); + } }, 300); }; diff --git a/src/constants/options/comment.js b/src/constants/options/comment.js index c20fec371..ca54b3340 100644 --- a/src/constants/options/comment.js +++ b/src/constants/options/comment.js @@ -1,3 +1,3 @@ export default ['trending', 'reputation', 'votes', 'age']; -export const VALUE = ['top', 'reputation', 'votes', 'time']; \ No newline at end of file +export const VALUE = ['top', 'reputation', 'votes', 'time']; diff --git a/src/containers/profileContainer.js b/src/containers/profileContainer.js index dd09a5fde..7e9b077c7 100644 --- a/src/containers/profileContainer.js +++ b/src/containers/profileContainer.js @@ -60,7 +60,9 @@ class ProfileContainer extends Component { const { isOwnProfile } = this.state; let targetUsername = currentAccountUsername; - if (!isConnected) return; + if (!isConnected) { + return; + } if (!isLoggedIn && !username) { navigation.navigate(ROUTES.SCREENS.LOGIN); @@ -75,7 +77,9 @@ class ProfileContainer extends Component { } UNSAFE_componentWillReceiveProps(nextProps) { - if (!nextProps.isConnected) return; + if (!nextProps.isConnected) { + return; + } const { isLoggedIn, navigation } = this.props; const { isOwnProfile } = this.state; diff --git a/src/containers/transferContainer.js b/src/containers/transferContainer.js index 149f3fc54..8a3823620 100644 --- a/src/containers/transferContainer.js +++ b/src/containers/transferContainer.js @@ -56,7 +56,9 @@ class TransferContainer extends Component { this.setState({ balance }); }) .catch(err => { - if (err) alert(get(err, 'message') || err.toString()); + if (err) { + alert(get(err, 'message') || err.toString()); + } }); }; diff --git a/src/providers/steem/dsteem.js b/src/providers/steem/dsteem.js index 008613b09..1d2bfdaa8 100644 --- a/src/providers/steem/dsteem.js +++ b/src/providers/steem/dsteem.js @@ -122,7 +122,9 @@ export const getUser = async user => { const _account = { ...account[0] }; let unreadActivityCount; - if (account && account.length < 1) return null; + if (account && account.length < 1) { + return null; + } const globalProperties = await client.database.getDynamicGlobalProperties(); const rcPower = await client.call('rc_api', 'find_rc_accounts', { accounts: [user] }); diff --git a/src/screens/follows/container/followsContainer.js b/src/screens/follows/container/followsContainer.js index a2c46811f..64d3d34f3 100644 --- a/src/screens/follows/container/followsContainer.js +++ b/src/screens/follows/container/followsContainer.js @@ -52,7 +52,9 @@ class FollowsContainer extends Component { let _startWith; const { username, users, isFollowingPress, startWith, count } = this.state; - if ((users && count < 100) || (users && count === users.length + 1)) return; + if ((users && count < 100) || (users && count === users.length + 1)) { + return; + } const name = username || _username; const isFollowing = isFollowingPress || _isFollowingPress; @@ -71,7 +73,9 @@ class FollowsContainer extends Component { }); } - if (!_username) _users.shift(); + if (!_username) { + _users.shift(); + } this.setState({ users: !_username ? [...users, ..._users] : _users, diff --git a/src/screens/login/container/loginContainer.js b/src/screens/login/container/loginContainer.js index 4d97e2271..f37db8fb0 100644 --- a/src/screens/login/container/loginContainer.js +++ b/src/screens/login/container/loginContainer.js @@ -124,7 +124,9 @@ class LoginContainer extends PureComponent { _getAccountsWithUsername = async username => { const { intl, isConnected } = this.props; - if (!isConnected) return null; + if (!isConnected) { + return null; + } try { const validUsers = await lookupAccounts(username); diff --git a/src/screens/post/container/postContainer.js b/src/screens/post/container/postContainer.js index 739f73d08..64fbbb5ed 100644 --- a/src/screens/post/container/postContainer.js +++ b/src/screens/post/container/postContainer.js @@ -32,7 +32,9 @@ class PostContainer extends Component { const { navigation } = this.props; const { content, permlink, author, isNewPost } = get(navigation, 'state.params'); - if (isNewPost) this.setState({ isNewPost }); + if (isNewPost) { + this.setState({ isNewPost }); + } if (content) { this.setState({ post: content }); diff --git a/src/screens/wallet/screen/sbdView.js b/src/screens/wallet/screen/sbdView.js index e6394c251..cae84854a 100644 --- a/src/screens/wallet/screen/sbdView.js +++ b/src/screens/wallet/screen/sbdView.js @@ -7,54 +7,54 @@ import { SteemWalletContainer, AccountContainer } from '../../../containers'; import globalStyles from '../../../globalStyles'; const SbdView = ({ handleOnSelected, index, currentIndex }) => ( - - - {({ currentAccount }) => ( - - {({ - isClaiming, - claimRewardBalance, - handleOnWalletRefresh, - refreshing, - transferHistory, - sbdBalance, - isLoading, - sbdSavingBalance, - estimatedValue, - sbdDropdown, - savingSbdDropdown, - navigate, - }) => ( - handleOnSelected(transferHistory, isLoading)} - index={index} - claim={claimRewardBalance} - fetchUserActivity={handleOnWalletRefresh} - isClaiming={isClaiming} - isLoading={isLoading} - refreshing={refreshing} - unclaimedBalance={0} - userBalance={[ - { balance: sbdBalance, nameKey: 'sbd', options: sbdDropdown }, - { balance: sbdSavingBalance, nameKey: 'savingsbd', options: savingSbdDropdown }, - ]} - handleOnDropdownSelected={option => navigate(option, 'SBD')} - type="sbd" - currentIndex={currentIndex} - showIconList={false} - valueDescriptions={[ - { - textKey: 'estimated_value', - value: , - subTextKey: 'estimated_value_desc', - }, - ]} - /> - )} - - )} - - + + + {({ currentAccount }) => ( + + {({ + isClaiming, + claimRewardBalance, + handleOnWalletRefresh, + refreshing, + transferHistory, + sbdBalance, + isLoading, + sbdSavingBalance, + estimatedValue, + sbdDropdown, + savingSbdDropdown, + navigate, + }) => ( + handleOnSelected(transferHistory, isLoading)} + index={index} + claim={claimRewardBalance} + fetchUserActivity={handleOnWalletRefresh} + isClaiming={isClaiming} + isLoading={isLoading} + refreshing={refreshing} + unclaimedBalance={0} + userBalance={[ + { balance: sbdBalance, nameKey: 'sbd', options: sbdDropdown }, + { balance: sbdSavingBalance, nameKey: 'savingsbd', options: savingSbdDropdown }, + ]} + handleOnDropdownSelected={option => navigate(option, 'SBD')} + type="sbd" + currentIndex={currentIndex} + showIconList={false} + valueDescriptions={[ + { + textKey: 'estimated_value', + value: , + subTextKey: 'estimated_value_desc', + }, + ]} + /> + )} + + )} + + ); export default SbdView; diff --git a/src/screens/wallet/screen/steemView.js b/src/screens/wallet/screen/steemView.js index e69bba18a..28bbf1ec3 100644 --- a/src/screens/wallet/screen/steemView.js +++ b/src/screens/wallet/screen/steemView.js @@ -25,32 +25,36 @@ const SteemView = ({ handleOnSelected, index, currentIndex }) => ( savingSteemDropdown, navigate, }) => ( - handleOnSelected(transferHistory, isLoading)} - index={index} - claim={claimRewardBalance} - fetchUserActivity={handleOnWalletRefresh} - isClaiming={isClaiming} - isLoading={isLoading} - refreshing={refreshing} - unclaimedBalance={0} - userBalance={[ - { balance: steemBalance, nameKey: 'steem', options: steemDropdown }, - { balance: steemSavingBalance, nameKey: 'savingsteem', options: savingSteemDropdown }, - ]} - handleOnDropdownSelected={option => navigate(option, 'STEEM')} - type="steem" - currentIndex={currentIndex} - showIconList={false} - valueDescriptions={[ - { - textKey: 'estimated_value', - value: , - subTextKey: 'estimated_value_desc', - }, - ]} - /> - )} + handleOnSelected(transferHistory, isLoading)} + index={index} + claim={claimRewardBalance} + fetchUserActivity={handleOnWalletRefresh} + isClaiming={isClaiming} + isLoading={isLoading} + refreshing={refreshing} + unclaimedBalance={0} + userBalance={[ + { balance: steemBalance, nameKey: 'steem', options: steemDropdown }, + { + balance: steemSavingBalance, + nameKey: 'savingsteem', + options: savingSteemDropdown, + }, + ]} + handleOnDropdownSelected={option => navigate(option, 'STEEM')} + type="steem" + currentIndex={currentIndex} + showIconList={false} + valueDescriptions={[ + { + textKey: 'estimated_value', + value: , + subTextKey: 'estimated_value_desc', + }, + ]} + /> + )} )} diff --git a/src/utils/authorReputation.js b/src/utils/authorReputation.js index b281573ce..22e189c88 100644 --- a/src/utils/authorReputation.js +++ b/src/utils/authorReputation.js @@ -1,5 +1,7 @@ export default input => { - if (!input) return 0; + if (!input) { + return 0; + } if (input === 0) { return 25; @@ -11,14 +13,20 @@ export default input => { let neg = false; - if (input < 0) neg = true; + if (input < 0) { + neg = true; + } let reputationLevel = Math.log10(Math.abs(input)); reputationLevel = Math.max(reputationLevel - 9, 0); - if (reputationLevel < 0) reputationLevel = 0; + if (reputationLevel < 0) { + reputationLevel = 0; + } - if (neg) reputationLevel *= -1; + if (neg) { + reputationLevel *= -1; + } reputationLevel = reputationLevel * 9 + 25; diff --git a/src/utils/clipboard.js b/src/utils/clipboard.js index 56d20adc1..8d75b4ad1 100644 --- a/src/utils/clipboard.js +++ b/src/utils/clipboard.js @@ -6,7 +6,9 @@ const readFromClipboard = async () => { }; const writeToClipboard = async text => { - if (!text) return false; + if (!text) { + return false; + } await Clipboard.setString(text); diff --git a/src/utils/conversions.js b/src/utils/conversions.js index 1f35759e9..7b781d39f 100644 --- a/src/utils/conversions.js +++ b/src/utils/conversions.js @@ -1,11 +1,15 @@ export const vestsToSp = (vests, steemPerMVests) => { - if (!vests || !steemPerMVests) return 0; + if (!vests || !steemPerMVests) { + return 0; + } return (vests / 1e6) * steemPerMVests; }; export const vestsToRshares = (vests, votingPower, votePerc) => { - if (!vests || !votingPower || !votePerc) return 0; + if (!vests || !votingPower || !votePerc) { + return 0; + } const vestingShares = parseInt(vests * 1e6, 10); const power = (votingPower * votePerc) / 1e4 / 50 + 1; diff --git a/src/utils/editor.js b/src/utils/editor.js index fbf358189..dffbc3686 100644 --- a/src/utils/editor.js +++ b/src/utils/editor.js @@ -8,7 +8,9 @@ export const getWordsCount = text => const permlinkRnd = () => (Math.random() + 1).toString(16).substring(2); export const generatePermlink = (title, random = false) => { - if (!title) return ''; + if (!title) { + return ''; + } const slug = getSlug(title); let perm = slug && slug.toString(); @@ -36,7 +38,9 @@ export const generatePermlink = (title, random = false) => { }; export const generateReplyPermlink = toAuthor => { - if (!toAuthor) return ''; + if (!toAuthor) { + return ''; + } const t = new Date(Date.now()); @@ -54,7 +58,9 @@ export const generateReplyPermlink = toAuthor => { }; export const makeOptions = (author, permlink, operationType) => { - if (!author || !permlink) return {}; + if (!author || !permlink) { + return {}; + } const a = { allow_curation_rewards: true, @@ -154,7 +160,9 @@ export const extractMetadata = body => { }; export const createPatch = (text1, text2) => { - if (!text1 && text1 === '') return undefined; + if (!text1 && text1 === '') { + return undefined; + } const dmp = new diffMatchPatch(); const patches = dmp.patch_make(text1, text2); diff --git a/src/utils/formatter.js b/src/utils/formatter.js index c8c84e989..8c1455a33 100644 --- a/src/utils/formatter.js +++ b/src/utils/formatter.js @@ -1,7 +1,13 @@ export const makeCountFriendly = value => { - if (!value) return value; - if (value >= 1000000) return `${intlFormat(value / 1000000)}M`; - if (value >= 1000) return `${intlFormat(value / 1000)}K`; + if (!value) { + return value; + } + if (value >= 1000000) { + return `${intlFormat(value / 1000000)}M`; + } + if (value >= 1000) { + return `${intlFormat(value / 1000)}K`; + } return intlFormat(value); }; diff --git a/src/utils/image.js b/src/utils/image.js index 4730f1b9b..ff7b8c63d 100644 --- a/src/utils/image.js +++ b/src/utils/image.js @@ -38,17 +38,23 @@ export const catchEntryImage = (entry, width = 0, height = 0) => { // try to extract images by regex const imgReg2 = /(http(s?):)([/|.|\w|\s|-])*\.(?:jpe?g|gif|png)/gim; const m = entry.body.match(imgReg2); - if (m) return proxifyImageSrc(m[0], width, height); + if (m) { + return proxifyImageSrc(m[0], width, height); + } // If no image specified in json metadata, try extract first image href from entry body let imgReg = //; let bodyMatch = entry.body.match(imgReg); - if (bodyMatch) return proxifyImageSrc(bodyMatch[1], width, height); + if (bodyMatch) { + return proxifyImageSrc(bodyMatch[1], width, height); + } // If there is no tag, check from markdown img tag ![](image.png) imgReg = /(?:!\[(.*?)\]\((.*?)\))/; bodyMatch = imgReg.exec(entry.body); - if (bodyMatch) return proxifyImageSrc(bodyMatch[2], width, height); + if (bodyMatch) { + return proxifyImageSrc(bodyMatch[2], width, height); + } return null; }; @@ -65,15 +71,21 @@ export const catchDraftImage = body => { }; export const getResizedImage = (url, size = 400) => { - if (!url) return ''; + if (!url) { + return ''; + } - if (url.includes('img.esteem')) return `https://img.esteem.ws/${size}x0/${url}`; + if (url.includes('img.esteem')) { + return `https://img.esteem.ws/${size}x0/${url}`; + } return `https://steemitimages.com/${size}x0/${url}`; }; export const getResizedAvatar = (author, sizeString = 'small') => { - if (!author) return ''; + if (!author) { + return ''; + } return `https://steemitimages.com/u/${author}/avatar/${sizeString}`; }; diff --git a/src/utils/jsonUtils.js b/src/utils/jsonUtils.js index 1d5a487ce..59bd82efb 100644 --- a/src/utils/jsonUtils.js +++ b/src/utils/jsonUtils.js @@ -1,5 +1,7 @@ export const jsonStringify = jsonMetadata => { - if (!jsonMetadata) return ''; + if (!jsonMetadata) { + return ''; + } try { return JSON.stringify(jsonMetadata); diff --git a/src/utils/manaBar.js b/src/utils/manaBar.js index d931280b7..e38478ef2 100644 --- a/src/utils/manaBar.js +++ b/src/utils/manaBar.js @@ -18,7 +18,9 @@ export const getVotingPower = account => { let currentMana = Number(manabar.current_mana) + (elapsed * maxMana) / PERIOD; - if (currentMana > maxMana) currentMana = maxMana; + if (currentMana > maxMana) { + currentMana = maxMana; + } return (currentMana * 100) / maxMana; }; @@ -38,7 +40,9 @@ export const getRcPower = account => { let currentMana = Number(manabar.current_mana) + (elapsed * maxMana) / PERIOD; - if (currentMana > maxMana) currentMana = maxMana; + if (currentMana > maxMana) { + currentMana = maxMana; + } return (currentMana * 100) / maxMana; }; diff --git a/src/utils/number.js b/src/utils/number.js index 3f7e44fc1..75ff9f66c 100644 --- a/src/utils/number.js +++ b/src/utils/number.js @@ -1,7 +1,11 @@ export const countDecimals = value => { - if (!value) return 0; + if (!value) { + return 0; + } - if (Math.floor(value) === value) return 0; + if (Math.floor(value) === value) { + return 0; + } return value.toString().split('.')[1].length || 0; }; diff --git a/src/utils/parseToken.js b/src/utils/parseToken.js index 21130edca..827d14b14 100644 --- a/src/utils/parseToken.js +++ b/src/utils/parseToken.js @@ -1,5 +1,7 @@ export default strVal => { - if (!strVal) return 0; + if (!strVal) { + return 0; + } return Number(parseFloat(strVal.split(' ')[0])); }; diff --git a/src/utils/reputation.js b/src/utils/reputation.js index c0a2c6d9a..4e1f1fb5d 100644 --- a/src/utils/reputation.js +++ b/src/utils/reputation.js @@ -1,5 +1,7 @@ export const getReputation = reputation => { - if (reputation === null) return reputation; + if (reputation === null) { + return reputation; + } let _reputation = String(parseInt(reputation, 10)); @@ -13,7 +15,9 @@ export const getReputation = reputation => { let out = n + (log - parseInt(log, 10)); // eslint-disable-next-line no-restricted-globals - if (isNaN(out)) out = 0; + if (isNaN(out)) { + out = 0; + } out = Math.max(out - 9, 0); out *= neg ? -1 : 1; diff --git a/src/utils/settings.js b/src/utils/settings.js index 8aedc9375..c1ba9edcd 100644 --- a/src/utils/settings.js +++ b/src/utils/settings.js @@ -2,7 +2,9 @@ export const groomingServerName = (serverName, prefix1) => { const PREFIX1 = prefix1 || 'https://'; const PREFIX2 = 'https://'; - if (!serverName) return null; + if (!serverName) { + return null; + } if (serverName.indexOf(PREFIX1) === 0) { return serverName.substr(PREFIX1.length); diff --git a/src/utils/user.js b/src/utils/user.js index d9059f7bd..c2330abed 100644 --- a/src/utils/user.js +++ b/src/utils/user.js @@ -9,14 +9,20 @@ export const getReputation = input => { let neg = false; - if (input < 0) neg = true; + if (input < 0) { + neg = true; + } let reputationLevel = Math.log10(Math.abs(input)); reputationLevel = Math.max(reputationLevel - 9, 0); - if (reputationLevel < 0) reputationLevel = 0; + if (reputationLevel < 0) { + reputationLevel = 0; + } - if (neg) reputationLevel *= -1; + if (neg) { + reputationLevel *= -1; + } reputationLevel = reputationLevel * 9 + 25;