From 740dedecc7ef92a6cd78c0d5a28bb6504a167555 Mon Sep 17 00:00:00 2001 From: Warrick Corfe-Tan Date: Mon, 21 Jun 2021 09:44:02 +1000 Subject: [PATCH] Switched hook used for checking online status. --- ts/components/OnionStatusDialog.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ts/components/OnionStatusDialog.tsx b/ts/components/OnionStatusDialog.tsx index a3275c7a5..6cadfbb83 100644 --- a/ts/components/OnionStatusDialog.tsx +++ b/ts/components/OnionStatusDialog.tsx @@ -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 {