about summary refs log tree commit diff
path: root/app/assets/javascripts/components/features/following
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/components/features/following')
-rw-r--r--app/assets/javascripts/components/features/following/index.jsx32
1 files changed, 25 insertions, 7 deletions
diff --git a/app/assets/javascripts/components/features/following/index.jsx b/app/assets/javascripts/components/features/following/index.jsx
index c4ec7bb67..559911a7d 100644
--- a/app/assets/javascripts/components/features/following/index.jsx
+++ b/app/assets/javascripts/components/features/following/index.jsx
@@ -8,6 +8,10 @@ import {
 } from '../../actions/accounts';
 import { ScrollContainer } from 'react-router-scroll';
 import AccountContainer from '../../containers/account_container';
+import Column from '../ui/components/column';
+import HeaderContainer from '../account_timeline/containers/header_container';
+import LoadMore from '../../components/load_more';
+import ColumnBackButton from '../../components/column_back_button';
 
 const mapStateToProps = (state, props) => ({
   accountIds: state.getIn(['user_lists', 'following', Number(props.params.accountId), 'items'])
@@ -41,21 +45,35 @@ const Following = React.createClass({
     }
   },
 
+  handleLoadMore (e) {
+    e.preventDefault();
+    this.props.dispatch(expandFollowing(Number(this.props.params.accountId)));
+  },
+
   render () {
     const { accountIds } = this.props;
 
     if (!accountIds) {
-      return <LoadingIndicator />;
+      return (
+        <Column>
+          <LoadingIndicator />
+        </Column>
+      );
     }
 
     return (
-      <ScrollContainer scrollKey='following'>
-        <div className='scrollable' onScroll={this.handleScroll}>
-          <div>
-            {accountIds.map(id => <AccountContainer key={id} id={id} withNote={false} />)}
+      <Column>
+        <ColumnBackButton />
+        <ScrollContainer scrollKey='following'>
+          <div className='scrollable' onScroll={this.handleScroll}>
+            <div>
+              <HeaderContainer accountId={this.props.params.accountId} />
+              {accountIds.map(id => <AccountContainer key={id} id={id} withNote={false} />)}
+              <LoadMore onClick={this.handleLoadMore} />
+            </div>
           </div>
-        </div>
-      </ScrollContainer>
+        </ScrollContainer>
+      </Column>
     );
   }