Skip to content

Commit

Permalink
fix: code format updates
Browse files Browse the repository at this point in the history
  • Loading branch information
tomzemp committed Sep 12, 2023
1 parent 0df2188 commit 151357d
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions adapter/src/components/ServerVersionProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,21 @@ export const ServerVersionProvider = ({
if (loginApp) {
const fakeSystemInfo = { version: '2.40-SNAPSHOT' }
setState({ loading: false, systemInfo: fakeSystemInfo })
} else {
const request = get(`${url}/api/system/info`)
request
.then((systemInfo) => {
setState({ loading: false, systemInfo })
})
.catch((e) => {
// Todo: If this is a network error, the app cannot load -- handle that gracefully here
// if (e === 'Network error') { ... }
setState({ loading: false, error: e })
})
return
}
const request = get(`${url}/api/system/info`)
request
.then((systemInfo) => {
setState({ loading: false, systemInfo })
})
.catch((e) => {
// Todo: If this is a network error, the app cannot load -- handle that gracefully here
// if (e === 'Network error') { ... }
setState({ loading: false, error: e })
})

return () => {
request.abort()
}
return () => {
request.abort()
}
}, [url, loginApp])

Expand Down

0 comments on commit 151357d

Please sign in to comment.