MCPcopy
hub / github.com/watsonbox/exportify / componentDidMount

Method componentDidMount

src/components/PlaylistTable.tsx:174–193  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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} />

Callers

nothing calls this directly

Calls 1

apiCallErrorHandlerFunction · 0.90

Tested by

no test coverage detected