22 Badge ,
33 Box ,
44 Button ,
5+ Grid ,
56 Stack ,
67 Table ,
78 TableContainer ,
@@ -10,11 +11,13 @@ import {
1011 Text ,
1112 Th ,
1213 Thead ,
14+ Tooltip ,
1315 Tr ,
1416 useDisclosure ,
1517} from "@chakra-ui/react" ;
1618import { Link } from "react-router-dom" ;
1719import { ExternalLinkIcon } from "@chakra-ui/icons" ;
20+ import dayjs from "dayjs" ;
1821import {
1922 ArticleDeliveryOutcome ,
2023 ArticleDeliveryResult ,
@@ -191,6 +194,94 @@ export const ArticleDeliveryDetails = ({ result, lastRequestAtUnix }: Props) =>
191194 { getDisplayText ( ) }
192195 </ Text >
193196 </ Box >
197+ < Box >
198+ < Text fontWeight = "semibold" mb = { 2 } >
199+ Dates
200+ </ Text >
201+ < Grid as = "dl" templateColumns = "140px 1fr" gap = { 1 } fontSize = "sm" m = { 0 } >
202+ < Text as = "dt" color = "gray.400" >
203+ Published
204+ </ Text >
205+ < Box as = "dd" ml = { 0 } >
206+ { result . articlePublishedDate ? (
207+ < Tooltip
208+ label = { dayjs ( result . articlePublishedDate ) . format ( "DD MMM YYYY, HH:mm:ss" ) }
209+ hasArrow
210+ >
211+ < Text
212+ as = "time"
213+ dateTime = { result . articlePublishedDate }
214+ tabIndex = { 0 }
215+ cursor = "default"
216+ color = "gray.300"
217+ display = "inline"
218+ borderBottom = "1px dashed"
219+ borderColor = "whiteAlpha.300"
220+ sx = { { cursor : "help" } }
221+ >
222+ { dayjs ( result . articlePublishedDate ) . fromNow ( ) }
223+ </ Text >
224+ </ Tooltip >
225+ ) : (
226+ < Tooltip
227+ label = "This feed does not include a published date for this article"
228+ hasArrow
229+ >
230+ < Text
231+ tabIndex = { 0 }
232+ color = "gray.400"
233+ display = "inline"
234+ borderBottom = "1px dashed"
235+ borderColor = "whiteAlpha.200"
236+ sx = { { cursor : "help" } }
237+ aria-label = "Not available. This feed does not include a published date for this article."
238+ >
239+ --
240+ </ Text >
241+ </ Tooltip >
242+ ) }
243+ </ Box >
244+ < Text as = "dt" color = "gray.400" >
245+ First detected
246+ </ Text >
247+ < Box as = "dd" ml = { 0 } >
248+ { result . articleStoredDate ? (
249+ < Tooltip
250+ label = { dayjs ( result . articleStoredDate ) . format ( "DD MMM YYYY, HH:mm:ss" ) }
251+ hasArrow
252+ >
253+ < Text
254+ as = "time"
255+ dateTime = { result . articleStoredDate }
256+ tabIndex = { 0 }
257+ cursor = "default"
258+ color = "gray.300"
259+ display = "inline"
260+ borderBottom = "1px dashed"
261+ borderColor = "whiteAlpha.300"
262+ sx = { { cursor : "help" } }
263+ >
264+ { dayjs ( result . articleStoredDate ) . fromNow ( ) }
265+ </ Text >
266+ </ Tooltip >
267+ ) : (
268+ < Tooltip label = "This article has not been stored yet" hasArrow >
269+ < Text
270+ tabIndex = { 0 }
271+ color = "gray.400"
272+ display = "inline"
273+ borderBottom = "1px dashed"
274+ borderColor = "whiteAlpha.200"
275+ sx = { { cursor : "help" } }
276+ aria-label = "Not available. This article has not been stored yet."
277+ >
278+ --
279+ </ Text >
280+ </ Tooltip >
281+ ) }
282+ </ Box >
283+ </ Grid >
284+ </ Box >
194285 { ! isLearningPhase && result . mediumResults . length > 0 && (
195286 < Box >
196287 < Text fontWeight = "semibold" mb = { 2 } >
0 commit comments