Skip to content
This repository has been archived by the owner on Aug 6, 2021. It is now read-only.

Commit

Permalink
Check bunq API instead of remote address
Browse files Browse the repository at this point in the history
  • Loading branch information
Crecket committed Dec 18, 2018
1 parent caaff01 commit 001a4e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/react/Components/Layout.jsx
Expand Up @@ -144,8 +144,8 @@ class Layout extends React.Component {
this.checkLanguageChange(nextProps);

if (nextProps.theme === "DefaultTheme") {
if (document.documentElement.style.backgroundColor !== "#ffffff") {
document.documentElement.style.backgroundColor = "#ffffff";
if (document.documentElement.style.backgroundColor !== "#fafafa") {
document.documentElement.style.backgroundColor = "#fafafa";
}
} else {
if (document.documentElement.style.backgroundColor !== "#303030") {
Expand Down
6 changes: 5 additions & 1 deletion src/react/Components/NetworkStatusChecker.jsx
Expand Up @@ -51,11 +51,15 @@ class NetworkStatusChecker extends React.PureComponent {
*/
checkNetWorkStatus = () => {
axios
.get("https://google.com")
.get("https://api.bunq.com/v1/user")
.then(response => {
this.props.applicationSetOnline();
})
.catch(error => {
if (error.toString() !== "Error: Network Error") {
this.props.applicationSetOnline();
return;
}
this.props.applicationSetOffline();
});
};
Expand Down

0 comments on commit 001a4e8

Please sign in to comment.