File tree Expand file tree Collapse file tree
features/status/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,6 +65,12 @@ export function Timeline({ checks, range }: TimelineProps) {
6565
6666 const now = useMemo ( ( ) => Date . now ( ) , [ ] ) ;
6767
68+ const formatBucketTime = ( ts : number ) => {
69+ if ( range . type === "minutes" ) return format ( ts , "HH:mm:ss" ) ;
70+ if ( range . type === "hours" ) return format ( ts , "HH:mm" ) ;
71+ return format ( ts , "MMM d, HH:mm" ) ;
72+ } ;
73+
6874 return (
6975 < div className = "space-y-2" >
7076 < div className = "flex h-6 gap-0.5" >
@@ -85,7 +91,7 @@ export function Timeline({ checks, range }: TimelineProps) {
8591 content : (
8692 < div className = "text-xs" >
8793 < div className = "font-bold" > { bucket . status === "good" ? "Healthy" : bucket . status === "bad" ? "Down" : "No Data" } </ div >
88- < div > { format ( bucket . start , "HH:mm" ) } - { format ( bucket . end , "HH:mm" ) } </ div >
94+ < div > { formatBucketTime ( bucket . start ) } – { formatBucketTime ( bucket . end ) } </ div >
8995 </ div >
9096 )
9197 } ) ;
You can’t perform that action at this time.
0 commit comments