show failed_at timestamp if a feed failed to fresh
This commit is contained in:
@ -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 &&
|
||||
|
||||
Reference in New Issue
Block a user