Switched hook used for checking online status.

pull/1706/head
Warrick Corfe-Tan 4 years ago
parent 0c5fd6236d
commit 740dedecc7

@ -16,10 +16,12 @@ import { SessionWrapperModal } from '../components/session/SessionWrapperModal';
import ip2country from 'ip2country';
import countryLookup from 'country-code-lookup';
import { useTheme } from 'styled-components';
import { useNetwork } from '../hooks/useNetwork';
import { Snode } from '../data/data';
import { onionPathModal } from '../state/ducks/modalDialog';
// tslint:disable-next-line: no-submodule-imports
import useNetworkState from 'react-use/lib/useNetworkState';
export type OnionPathModalType = {
confirmText?: string;
cancelText?: string;
@ -145,7 +147,7 @@ export const ActionPanelOnionStatusLight = (props: {
const onionState = useSelector((state: StateType) => state.onionPaths);
iconColor = red;
const isOnline = useNetwork();
const isOnline = useNetworkState().online;
if (!(onionState && onionState.snodePath) || !isOnline) {
iconColor = red;
} else {

Loading…
Cancel
Save