From 1b30b898a3b282c0013cc203f6fc1a3942ed7aba Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Mon, 18 Sep 2023 12:28:27 +0300 Subject: [PATCH] Implement function of calendar --- src/pages/Dashboard/ConsensusUptime/ConsensusUptimeCard.tsx | 2 -- src/pages/Dashboard/DeviceUptime/DeviceUptime.tsx | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/pages/Dashboard/ConsensusUptime/ConsensusUptimeCard.tsx b/src/pages/Dashboard/ConsensusUptime/ConsensusUptimeCard.tsx index 06921936..186f63e6 100644 --- a/src/pages/Dashboard/ConsensusUptime/ConsensusUptimeCard.tsx +++ b/src/pages/Dashboard/ConsensusUptime/ConsensusUptimeCard.tsx @@ -6,8 +6,6 @@ import Icon from '../../../components/General/Icon' const data: DataItem[] = [ { - // @NOTE: if you want to add name in the XAxis. You need to set the names here - // name: 'Jan', pv: 1, pa: 1, }, diff --git a/src/pages/Dashboard/DeviceUptime/DeviceUptime.tsx b/src/pages/Dashboard/DeviceUptime/DeviceUptime.tsx index 1c814029..424c2061 100644 --- a/src/pages/Dashboard/DeviceUptime/DeviceUptime.tsx +++ b/src/pages/Dashboard/DeviceUptime/DeviceUptime.tsx @@ -79,8 +79,8 @@ const DeviceUptime = () => { const [isCalendarVisible, setIsCalendarVisible] = useState(false) const [dateRange, setDateRange] = useState({ from: undefined, to: undefined }) const [startMonth, endMonth] = getMonthIndicesFromRange(dateRange) + const filteredMonths = data.slice(startMonth, endMonth + 1) - console.log(startMonth, endMonth) const handleRangeSelect = ( range: DateRange | undefined, // @NOTE: You can take selectedDay: Date, @@ -106,7 +106,7 @@ const DeviceUptime = () => { - Balance + Device Uptime { - +