From 9f29db96ec6e08f6c645adb6b6bc724867c50609 Mon Sep 17 00:00:00 2001 From: RadoslavDimchev Date: Thu, 19 Oct 2023 11:37:27 +0300 Subject: [PATCH] fix: remove right sidebar css module --- src/components/Charts/StandardLineChart.tsx | 2 ++ .../General/RightSideBar/RightSidebar.module.css | 16 ---------------- src/pages/Dashboard/UptimeChart/UptimeChart.tsx | 6 +++--- 3 files changed, 5 insertions(+), 19 deletions(-) delete mode 100644 src/components/General/RightSideBar/RightSidebar.module.css diff --git a/src/components/Charts/StandardLineChart.tsx b/src/components/Charts/StandardLineChart.tsx index 16a55732..0c264bae 100644 --- a/src/components/Charts/StandardLineChart.tsx +++ b/src/components/Charts/StandardLineChart.tsx @@ -16,6 +16,7 @@ interface StandardLineChartProps { data: ChartData[] isInteractive?: boolean } + const StandardLineChart = ({ data, isInteractive }: StandardLineChartProps) => { const maxMemory = data[0].maxValue || 'auto' const colors = data.map(dataset => dataset.color) @@ -48,4 +49,5 @@ const StandardLineChart = ({ data, isInteractive }: StandardLineChartProps) => { /> ) } + export default StandardLineChart diff --git a/src/components/General/RightSideBar/RightSidebar.module.css b/src/components/General/RightSideBar/RightSidebar.module.css deleted file mode 100644 index 6bb67f65..00000000 --- a/src/components/General/RightSideBar/RightSidebar.module.css +++ /dev/null @@ -1,16 +0,0 @@ -.transparent-scrollbar::-webkit-scrollbar { - width: 8px; -} - -.transparent-scrollbar::-webkit-scrollbar-thumb { - background: rgba(0, 0, 0, 0.1); - border-radius: 10px; -} - -.transparent-scrollbar::-webkit-scrollbar-thumb:hover { - background: rgba(0, 0, 0, 0.2); -} - -.transparent-scrollbar::-webkit-scrollbar-corner { - background: transparent; -} diff --git a/src/pages/Dashboard/UptimeChart/UptimeChart.tsx b/src/pages/Dashboard/UptimeChart/UptimeChart.tsx index ab25b370..7e3e74e7 100644 --- a/src/pages/Dashboard/UptimeChart/UptimeChart.tsx +++ b/src/pages/Dashboard/UptimeChart/UptimeChart.tsx @@ -181,14 +181,14 @@ type UptimeChartProps = { withLabels: boolean } +const keys = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten'] + const updateMonthlyValues = (data: any, monthlyActivity: any) => { if (!Array.isArray(monthlyActivity) || monthlyActivity.length !== 12) { console.error('monthlyActivity should be an array with 12 values') return } - const keys = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten'] - for (let i = 0; i < data.length; i++) { const month = data[i] const activity = monthlyActivity[i] @@ -201,6 +201,7 @@ const updateMonthlyValues = (data: any, monthlyActivity: any) => { } } } + return data } @@ -209,7 +210,6 @@ const UptimeChart = ({ monthlyActivity, startMonth, endMonth, withLabels }: Upti console.log(updatedData) const filteredData = data.slice(startMonth, endMonth + 1) - filteredData return (