Skip to content

Commit

Permalink
Merge branch 'develop' into node-14
Browse files Browse the repository at this point in the history
  • Loading branch information
rickycodes authored Apr 16, 2021
2 parents fd2e79b + 86771f7 commit 86b4bbb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/components/Nav/Main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,17 @@ const Main = props => {

const connectionChangeHandler = useCallback(
state => {
if (!state) return;
const { isConnected } = state;
// Show the modal once the status changes to offline
if (connected && state && !state.isConnected) {
if (connected && isConnected === false) {
props.navigation.navigate('OfflineModeView');
setConnected(state.isConnected);
}
if (connected !== isConnected && isConnected !== null) {
setConnected(isConnected);
}
},
[connected, props.navigation]
[connected, setConnected, props.navigation]
);

const checkInfuraAvailability = useCallback(async () => {
Expand Down

0 comments on commit 86b4bbb

Please sign in to comment.