mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-03 15:13:38 +00:00
clear code
This commit is contained in:
parent
710dadc861
commit
b64603ea8f
@ -1,3 +1,4 @@
|
|||||||
|
import { BarChart, Bar, ResponsiveContainer, XAxis } from 'recharts';
|
||||||
|
|
||||||
const data: DataItem[] = [
|
const data: DataItem[] = [
|
||||||
{
|
{
|
||||||
@ -158,7 +159,6 @@ const data: DataItem[] = [
|
|||||||
'ten': 0,
|
'ten': 0,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
import { BarChart, Bar, ResponsiveContainer, XAxis } from 'recharts';
|
|
||||||
|
|
||||||
type DataItem = {
|
type DataItem = {
|
||||||
name: string;
|
name: string;
|
||||||
@ -180,13 +180,13 @@ type UptimeChartProps = {
|
|||||||
endMonth: number;
|
endMonth: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateMonthlyValues = (data:any, monthlyActivity:any) => {
|
const updateMonthlyValues = (data: any, monthlyActivity: any) => {
|
||||||
|
|
||||||
if (!Array.isArray(monthlyActivity) || monthlyActivity.length !== 12) {
|
if (!Array.isArray(monthlyActivity) || monthlyActivity.length !== 12) {
|
||||||
console.error("monthlyActivity should be an array with 12 values");
|
console.error("monthlyActivity should be an array with 12 values");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const keys = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten'];
|
|
||||||
|
const keys = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten'];
|
||||||
|
|
||||||
for (let i = 0; i < data.length; i++) {
|
for (let i = 0; i < data.length; i++) {
|
||||||
const month = data[i];
|
const month = data[i];
|
||||||
@ -200,7 +200,6 @@ const updateMonthlyValues = (data:any, monthlyActivity:any) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user