File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -137,9 +137,12 @@ const StateRoute = (props: StateRouteProps) => {
137
137
138
138
return (
139
139
< div className = "web-metrics-container" >
140
- < WebMetrics color = { LCPColor } series = { ( webMetrics . LCP / 2500 ) * 100 } formatted = { ( val ) => ( ( val / 100 ) * 2500 ) . toFixed ( 2 ) + ' ms' } label = "LCP" />
141
- < WebMetrics color = { FIDColor } series = { ( webMetrics . FID ) * 25 } formatted = { ( val ) => ( ( val / 25 ) ) . toFixed ( 2 ) + ' ms' } label = "FID" />
142
- { /* <WebMetrics color={CLSColor} series={(webMetrics.CLS * 50) * 100} formatted={(val) => ((val / 100) / 50).toFixed(2)} label="CLS"/> */ }
140
+ < WebMetrics color = { LCPColor } series = { ( webMetrics . LCP / 2500 ) * 100 }
141
+ formatted = { ( val ) => { return ( Number . isNaN ( val ) ) ? '-- ms' : ( ( ( val / 100 ) * 2500 ) . toFixed ( 2 ) + ' ms' ) } }
142
+ label = "LCP" />
143
+ < WebMetrics color = { FIDColor } series = { ( webMetrics . FID ) * 25 }
144
+ formatted = { ( val ) => { return ( Number . isNaN ( val ) ) ? '-- ms' : ( ( val / 25 ) . toFixed ( 2 ) + ' ms' ) } }
145
+ label = "FID" />
143
146
< WebMetrics color = { FCPColor } series = { ( webMetrics . FCP / 1000 ) * 100 } formatted = { ( val ) => ( ( val / 100 ) * 1000 ) . toFixed ( 2 ) + ' ms' } label = "FCP" />
144
147
< WebMetrics color = { TTFBColor } series = { ( webMetrics . TTFB / 10 ) * 100 } formatted = { ( val ) => ( ( val / 100 ) * 10 ) . toFixed ( 2 ) + ' ms' } label = "TTFB" />
145
148
</ div >
You can’t perform that action at this time.
0 commit comments