mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
add Preferences modal(30%done) & move some modules (actions, reducer, socket, store -> lib/~)
This commit is contained in:
@@ -32,22 +32,22 @@ export default class CreateNewFolder extends React.Component {
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err)
|
||||
if (err.code === '') {
|
||||
let alert = {
|
||||
var alert
|
||||
if (err.code === 'ECONNREFUSED') {
|
||||
alert = {
|
||||
type: 'error',
|
||||
message: 'Can\'t connect to API server.'
|
||||
}
|
||||
}
|
||||
else if (err.status != null) {
|
||||
let alert = {
|
||||
} else if (err.status != null) {
|
||||
alert = {
|
||||
type: 'error',
|
||||
message: err.response.body.message
|
||||
}
|
||||
this.setState({alert: alert})
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
throw err
|
||||
}
|
||||
|
||||
this.setState({alert: alert})
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user