Skip to content

Commit

Permalink
Recognize out of data paratime data (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
csillag committed Jul 6, 2023
1 parent 065a42f commit 3dae139
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/components/OfflineBanner/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 3dae139

Please sign in to comment.