We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 353005d commit 7ece0ecCopy full SHA for 7ece0ec
components/Meetup.js
@@ -21,16 +21,12 @@ export default class Meetup extends React.Component {
21
})
22
window
23
.fetch(NEXT_MEETUP_URI)
24
- .then(res => {
25
- // Gotta love network errors...
26
- if (!res.ok) throw Error(response.statusText)
27
- return response
28
- })
29
.then(res => res.json())
30
.then(json =>
31
this.setState({
32
...json,
33
- loading: false
+ loading: false,
+ error: false
34
35
)
36
.catch(_ => this.setState({ loading: false, error: true }))
0 commit comments