From 91511281c55ac9b7d3d8ce21d409905c2aec1955 Mon Sep 17 00:00:00 2001 From: Reed Garmsen Date: Tue, 7 Jul 2015 13:10:11 -0700 Subject: Changed loading logic for retrieving more channels to allow for loading animation to be inserted into the More... menu that allows you to join more channels while waiting for the list of channels to load --- web/react/components/more_channels.jsx | 53 +++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 20 deletions(-) (limited to 'web/react/components') diff --git a/web/react/components/more_channels.jsx b/web/react/components/more_channels.jsx index be2a5e93c..3cb83cec5 100644 --- a/web/react/components/more_channels.jsx +++ b/web/react/components/more_channels.jsx @@ -61,6 +61,10 @@ module.exports = React.createClass({ render: function() { var server_error = this.state.server_error ?
: null; var outter = this; + var moreChannels; + + if (this.state.channels != null) + moreChannels = this.state.channels; return (
- {this.state.channels.length ? - - - {this.state.channels.map(function(channel) { - return ( - - - - - ) - })} - -
-

{channel.display_name}

-

{channel.description}

-
- :
-

No more channels to join

-

Click 'Create New Channel' to make a new one

+ {moreChannels ? + (moreChannels.length ? + + + {this.state.channels.map(function(channel) { + return ( + + + + + ) + })} + +
+

{channel.display_name}

+

{channel.description}

+
+ :
+

No more channels to join

+

Click 'Create New Channel' to make a new one

+
) + :
+
+

Loading

+
+
+
+
} - { server_error } + { server_error }
-- cgit v1.2.3-1-g7c22