diff --git a/mobile/package-lock.json b/mobile/package-lock.json index bb4e78a..036633c 100644 --- a/mobile/package-lock.json +++ b/mobile/package-lock.json @@ -10,7 +10,7 @@ "dependencies": { "@proposal-system/api-contracts": "file:../shared/api-contracts", "@react-native-async-storage/async-storage": "^2.1.0", - "@react-native-community/netinfo": "^11.4.0", + "@react-native-community/netinfo": "^12.0.1", "@react-navigation/bottom-tabs": "^7.2.0", "@react-navigation/native": "^7.0.0", "@react-navigation/native-stack": "^7.2.0", @@ -1707,9 +1707,9 @@ } }, "node_modules/@react-native-community/netinfo": { - "version": "11.5.2", - "resolved": "https://registry.npmjs.org/@react-native-community/netinfo/-/netinfo-11.5.2.tgz", - "integrity": "sha512-/g0m65BtX9HU+bPiCH2517bOHpEIUsGrWFXDzi1a5nNKn5KujQgm04WhL7/OSXWKHyrT8VVtUoJA0XKRxueBpQ==", + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/@react-native-community/netinfo/-/netinfo-12.0.1.tgz", + "integrity": "sha512-P/3caXIvfYSJG8AWJVefukg+ZGRPs+M4Lp3pNJtgcTYoJxCjWrKQGNnCkj/Cz//zWa/avGed0i/wzm0T8vV2IQ==", "license": "MIT", "peerDependencies": { "react": "*", diff --git a/mobile/package.json b/mobile/package.json index 856a784..90b4790 100644 --- a/mobile/package.json +++ b/mobile/package.json @@ -11,7 +11,7 @@ "dependencies": { "@proposal-system/api-contracts": "file:../shared/api-contracts", "@react-native-async-storage/async-storage": "^2.1.0", - "@react-native-community/netinfo": "^11.4.0", + "@react-native-community/netinfo": "^12.0.1", "@react-navigation/bottom-tabs": "^7.2.0", "@react-navigation/native": "^7.0.0", "@react-navigation/native-stack": "^7.2.0", diff --git a/mobile/src/App.tsx b/mobile/src/App.tsx index 00ff3f4..026dbce 100644 --- a/mobile/src/App.tsx +++ b/mobile/src/App.tsx @@ -41,14 +41,16 @@ function AuthBootstrap({ children }: { children: React.ReactNode }) { if (state.isConnected) { processOfflineQueue((data) => proposalsApi.create(data as CreateProposalRequest), - ).then((count) => { - if (count > 0) { - Alert.alert( - 'Synced', - `${count} offline proposal${count > 1 ? 's' : ''} submitted.`, - ); - } - }); + ) + .then((count) => { + if (count > 0) { + Alert.alert( + 'Synced', + `${count} offline proposal${count > 1 ? 's' : ''} submitted.`, + ); + } + }) + .catch(() => {}); } }); return unsubscribe;