mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
show failed_at timestamp if a feed failed to fresh
This commit is contained in:
parent
61b3241b64
commit
f8a6887d09
2 changed files with 13 additions and 4 deletions
|
|
@ -30,6 +30,7 @@ export type Subscription = {
|
|||
updatedAt: string
|
||||
lastFetchedAt?: string
|
||||
mostRecentItemDate?: string
|
||||
failedAt?: string
|
||||
|
||||
fetchContentType?: FetchContentType
|
||||
}
|
||||
|
|
@ -74,6 +75,7 @@ export function useGetSubscriptionsQuery(
|
|||
lastFetchedAt
|
||||
fetchContentType
|
||||
mostRecentItemDate
|
||||
failedAt
|
||||
}
|
||||
}
|
||||
... on SubscriptionsError {
|
||||
|
|
|
|||
|
|
@ -229,10 +229,17 @@ export default function Rss(): JSX.Element {
|
|||
}}
|
||||
>
|
||||
<SpanBox>{`URL: ${subscription.url}`}</SpanBox>
|
||||
<SpanBox>{`Last refreshed: ${
|
||||
subscription.lastFetchedAt
|
||||
? formattedDateTime(subscription.lastFetchedAt)
|
||||
: 'Never'
|
||||
{/* show failed timestamp instead of last refreshed timestamp if the feed failed to refresh */}
|
||||
<SpanBox>{`${
|
||||
subscription.failedAt
|
||||
? `Failed to refresh: ${formattedDateTime(
|
||||
subscription.failedAt
|
||||
)}`
|
||||
: `Last refreshed: ${
|
||||
subscription.lastFetchedAt
|
||||
? formattedDateTime(subscription.lastFetchedAt)
|
||||
: 'Never'
|
||||
}`
|
||||
}`}</SpanBox>
|
||||
<SpanBox>
|
||||
{subscription.mostRecentItemDate &&
|
||||
|
|
|
|||
Loading…
Reference in a new issue