mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-14 10:16:26 +00:00
detect internet disconnection
This commit is contained in:
@@ -20,7 +20,9 @@ class Main extends React.Component {
|
|||||||
constructor (props) {
|
constructor (props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
||||||
if (process.env.NODE_ENV === 'production') {
|
const isOnline = window.navigator.onLine
|
||||||
|
|
||||||
|
if (process.env.NODE_ENV === 'production' && isOnline) {
|
||||||
mobileAnalytics.initAwsMobileAnalytics()
|
mobileAnalytics.initAwsMobileAnalytics()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user