()
| 172 | } |
| 173 | |
| 174 | async componentDidMount() { |
| 175 | try { |
| 176 | const user = await apiCall("https://api.spotify.com/v1/me", this.props.accessToken) |
| 177 | .then(response => response.data) |
| 178 | |
| 179 | Bugsnag.setUser(user.id, user.uri, user.display_name) |
| 180 | |
| 181 | this.userId = user.id |
| 182 | this.playlistsData = new PlaylistsData( |
| 183 | this.props.accessToken, |
| 184 | this.userId!, |
| 185 | this.handlePlaylistsLoadingStarted, |
| 186 | this.handlePlaylistsLoadingDone |
| 187 | ) |
| 188 | |
| 189 | await this.loadCurrentPlaylistPage() |
| 190 | } catch (error) { |
| 191 | apiCallErrorHandler(error) |
| 192 | } |
| 193 | } |
| 194 | |
| 195 | render() { |
| 196 | const progressBar = <ProgressBar striped variant="primary" animated={this.state.progressBar.value < this.state.playlistCount} now={this.state.progressBar.value} max={this.state.playlistCount} label={this.state.progressBar.label} /> |
nothing calls this directly
no test coverage detected