diff --git a/public/script.js b/public/script.js index 75d84e8..0ec532e 100644 --- a/public/script.js +++ b/public/script.js @@ -88,14 +88,14 @@ var DuplicateFinderBox = React.createClass({ currentId: null, currentUId: null, dups: null, - loading: false + dupsLoading: false }; }, handlePlaylistClick: function (id, uid) { this.setState({ currentId: id, currentUId: uid, - loading: true + dupsLoading: true }); var self = this; @@ -108,7 +108,7 @@ var DuplicateFinderBox = React.createClass({ var dups = data.data; self.setState({ dups: dups, - loading: false + dupsLoading: false }); }, error: function (xhr, response, err) { @@ -118,21 +118,25 @@ var DuplicateFinderBox = React.createClass({ }, render: function () { var duplicates =
Loading...
; - if (!this.state.loading) { + if (!this.state.dupsLoading) { duplicates =Loading...
; + if (!this.props.playlistsLoading) { + playlistBox =Please log in with Spotify :)
; if (this.isLoggedIn()) { + var playlistsLoading = this.state.playlistsLoading; content = ( -