File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/usage/rpc Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,18 @@ export default async function RPCUsage(props: {
63
63
Number ( totalCounts . rateLimitedCount ) +
64
64
Number ( totalCounts . overageCount ) ;
65
65
66
+ const peakRateDate = ( ( ) => {
67
+ if ( peakRate . date ) {
68
+ try {
69
+ return format ( new Date ( `${ peakRate . date } Z` ) , "MMM d, HH:mm" ) ;
70
+ } catch ( e ) {
71
+ console . error ( "Error parsing peak rate date" , peakRate . date , e ) ;
72
+ return null ;
73
+ }
74
+ }
75
+ return null ;
76
+ } ) ( ) ;
77
+
66
78
return (
67
79
< div className = "container mx-auto space-y-8 py-6" >
68
80
< div className = "flex flex-col gap-2" >
@@ -113,9 +125,7 @@ export default async function RPCUsage(props: {
113
125
</ div >
114
126
< p className = "mt-1 text-muted-foreground text-xs" >
115
127
< ClockIcon className = "mr-1 inline h-3 w-3" />
116
- { peakRate . date
117
- ? format ( new Date ( `${ peakRate . date } Z` ) , "MMM d, HH:mm" )
118
- : "No Requests in last 24 hours" }
128
+ { peakRateDate ? peakRateDate : "No Requests in last 24 hours" }
119
129
</ p >
120
130
</ CardContent >
121
131
</ Card >
You can’t perform that action at this time.
0 commit comments