You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/dashboard/src/app/team/[team_slug]/[project_slug]/components/RpcMethodBarChartCard/RpcMethodBarChartCardUI.tsx
+39-38Lines changed: 39 additions & 38 deletions
Original file line number
Diff line number
Diff line change
@@ -30,49 +30,50 @@ export function RpcMethodBarChartCardUI({
30
30
[rawData],
31
31
);
32
32
33
-
constdata=useMemo(
34
-
()=>
35
-
uniqueDates.map((date)=>{
36
-
constdateData: {[key: string]: string|number}={ date };
37
-
for(constmethodofuniqueMethods){
38
-
constmethodData=rawData.find(
39
-
(d)=>d.date===date&&d.evmMethod===method,
40
-
);
41
-
dateData[method]=methodData?.count??0;
42
-
}
33
+
constdata=useMemo(()=>{
34
+
returnuniqueDates.map((date)=>{
35
+
constdateData: {[key: string]: string|number}={ date };
36
+
for(constmethodofuniqueMethods){
37
+
constmethodData=rawData.find(
38
+
(d)=>d.date===date&&d.evmMethod===method,
39
+
);
40
+
dateData[method]=methodData?.count??0;
41
+
}
43
42
44
-
// If we have too many methods to display well, add "other" and group the lowest keys for each time period
45
-
if(uniqueMethods.length>5){
46
-
// If we haven't added "other" as a key yet, add it
47
-
if(!uniqueMethods.includes("Other")){
48
-
uniqueMethods.push("Other");
49
-
}
43
+
// If we have too many methods to display well, add "other" and group the lowest keys for each time period
44
+
if(uniqueMethods.length>5){
45
+
// If we haven't added "other" as a key yet, add it
46
+
if(!uniqueMethods.includes("Other")){
47
+
uniqueMethods.push("Other");
48
+
}
50
49
51
-
// Sort the methods by their count for the time period
0 commit comments