From f21e7d6ac06556671c2663ce2879442c60230b32 Mon Sep 17 00:00:00 2001
From: Eugen Rochko <eugen@zeonfederated.com>
Date: Mon, 30 Jan 2017 21:40:55 +0100
Subject: Make profile header scroll along with contents. AccountTimeline,
 Followers and Following are no longer nested inside a common parent
 (<Account>), instead they all embed <HeaderContainer />

---
 .../components/features/followers/index.jsx        | 32 +++++++++++++++++-----
 1 file changed, 25 insertions(+), 7 deletions(-)

(limited to 'app/assets/javascripts/components/features/followers/index.jsx')

diff --git a/app/assets/javascripts/components/features/followers/index.jsx b/app/assets/javascripts/components/features/followers/index.jsx
index 38755d862..b96516813 100644
--- a/app/assets/javascripts/components/features/followers/index.jsx
+++ b/app/assets/javascripts/components/features/followers/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', 'followers', Number(props.params.accountId), 'items'])
@@ -41,21 +45,35 @@ const Followers = 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='followers'>
-        <div className='scrollable' onScroll={this.handleScroll}>
-          <div>
-            {accountIds.map(id => <AccountContainer key={id} id={id} withNote={false} />)}
+      <Column>
+        <ColumnBackButton />
+        <ScrollContainer scrollKey='followers'>
+          <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>
     );
   }
 
-- 
cgit 

