From 3dae1393918e9904c89554f43b04cdedc45fbece Mon Sep 17 00:00:00 2001 From: Kristof Csillag Date: Thu, 6 Jul 2023 20:28:06 +0200 Subject: [PATCH] Recognize out of data paratime data (again) --- src/app/components/OfflineBanner/hook.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 {