diff options
Diffstat (limited to 'app/javascript/flavours/glitch/features/follow_recommendations')
-rw-r--r-- | app/javascript/flavours/glitch/features/follow_recommendations/components/account.jsx (renamed from app/javascript/flavours/glitch/features/follow_recommendations/components/account.js) | 8 | ||||
-rw-r--r-- | app/javascript/flavours/glitch/features/follow_recommendations/index.jsx (renamed from app/javascript/flavours/glitch/features/follow_recommendations/index.js) | 5 |
2 files changed, 7 insertions, 6 deletions
diff --git a/app/javascript/flavours/glitch/features/follow_recommendations/components/account.js b/app/javascript/flavours/glitch/features/follow_recommendations/components/account.jsx index 2c668da3e..e56af7364 100644 --- a/app/javascript/flavours/glitch/features/follow_recommendations/components/account.js +++ b/app/javascript/flavours/glitch/features/follow_recommendations/components/account.jsx @@ -27,13 +27,11 @@ const makeMapStateToProps = () => { }; const getFirstSentence = str => { - const arr = str.split(/(([\.\?!]+\s)|[.。?!\n•])/); + const arr = str.split(/(([.?!]+\s)|[.。?!\n•])/); return arr[0]; }; -export default @connect(makeMapStateToProps) -@injectIntl class Account extends ImmutablePureComponent { static propTypes = { @@ -50,7 +48,7 @@ class Account extends ImmutablePureComponent { } else { dispatch(followAccount(account.get('id'))); } - } + }; render () { const { account, intl } = this.props; @@ -83,3 +81,5 @@ class Account extends ImmutablePureComponent { } } + +export default connect(makeMapStateToProps)(injectIntl(Account)); diff --git a/app/javascript/flavours/glitch/features/follow_recommendations/index.js b/app/javascript/flavours/glitch/features/follow_recommendations/index.jsx index d9d962b7c..70f2191f1 100644 --- a/app/javascript/flavours/glitch/features/follow_recommendations/index.js +++ b/app/javascript/flavours/glitch/features/follow_recommendations/index.jsx @@ -19,7 +19,6 @@ const mapStateToProps = state => ({ isLoading: state.getIn(['suggestions', 'isLoading']), }); -export default @connect(mapStateToProps) class FollowRecommendations extends ImmutablePureComponent { static contextTypes = { @@ -69,7 +68,7 @@ class FollowRecommendations extends ImmutablePureComponent { })); router.history.push('/home'); - } + }; render () { const { suggestions, isLoading } = this.props; @@ -114,3 +113,5 @@ class FollowRecommendations extends ImmutablePureComponent { } } + +export default connect(mapStateToProps)(FollowRecommendations); |