diff --git a/src/app/components/OfflineBanner/hook.ts b/src/app/components/OfflineBanner/hook.ts index fb00b4b2b7..a0139f1b21 100644 --- a/src/app/components/OfflineBanner/hook.ts +++ b/src/app/components/OfflineBanner/hook.ts @@ -26,13 +26,15 @@ export const useRuntimeFreshness = (scope: SearchScope): FreshnessInfo => { } const query = useGetRuntimeStatus(scope.network, scope.layer) const timeDistance = useFormattedTimestampString(query?.data?.data.latest_block_time) + console.log('Time distance is', timeDistance) if (query.isLoading) { + console.log('Code path 1') return { outOfDate: undefined, } } - if (isApiReachable) { + if (!isApiReachable) { // The error state will be handled by NetworkOfflineBanner, // no need to display another banner whining about obsolete data. return {