about summary refs log tree commit diff
path: root/app/assets/javascripts
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-09-20 01:53:30 +0200
committerEugen Rochko <eugen@zeonfederated.com>2016-09-20 01:53:30 +0200
commita86f21cf90814ef0dd6e013202fb93ee83beca86 (patch)
tree0854f8b7ee148a4b6bbc35cffe7280673212bfed /app/assets/javascripts
parent1cfc9aa20e2f4a9d7b6dcd5227246e1a5375ab31 (diff)
Fix rake tasks and loading bar
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r--app/assets/javascripts/components/features/ui/containers/loading_bar_container.jsx8
-rw-r--r--app/assets/javascripts/components/features/ui/index.jsx4
2 files changed, 10 insertions, 2 deletions
diff --git a/app/assets/javascripts/components/features/ui/containers/loading_bar_container.jsx b/app/assets/javascripts/components/features/ui/containers/loading_bar_container.jsx
new file mode 100644
index 000000000..6c4e73e38
--- /dev/null
+++ b/app/assets/javascripts/components/features/ui/containers/loading_bar_container.jsx
@@ -0,0 +1,8 @@
+import { connect }    from 'react-redux';
+import LoadingBar from 'react-redux-loading-bar';
+
+const mapStateToProps = (state) => ({
+  loading: state.get('loadingBar')
+});
+
+export default connect(mapStateToProps)(LoadingBar.WrappedComponent);
diff --git a/app/assets/javascripts/components/features/ui/index.jsx b/app/assets/javascripts/components/features/ui/index.jsx
index fbfa361f2..323729dd6 100644
--- a/app/assets/javascripts/components/features/ui/index.jsx
+++ b/app/assets/javascripts/components/features/ui/index.jsx
@@ -8,7 +8,7 @@ import StatusListContainer    from './containers/status_list_container';
 import NotificationsContainer from './containers/notifications_container';
 import NavigationContainer    from './containers/navigation_container';
 import PureRenderMixin        from 'react-addons-pure-render-mixin';
-import LoadingBar             from 'react-redux-loading-bar';
+import LoadingBarContainer    from './containers/loading_bar_container';
 
 const UI = React.createClass({
 
@@ -46,7 +46,7 @@ const UI = React.createClass({
         </ColumnsArea>
 
         <NotificationsContainer />
-        <LoadingBar style={{ backgroundColor: '#2b90d9', left: '0', top: '0' }} />
+        <LoadingBarContainer style={{ backgroundColor: '#2b90d9', left: '0', top: '0' }} />
       </div>
     );
   }