From 592b7826bcb704f67956f3415da476e15173a1fd Mon Sep 17 00:00:00 2001 From: Puneet Khanduri Date: Mon, 19 Jun 2023 00:13:47 +0530 Subject: [PATCH] frontend working --- frontend/src/features/appbar/AppBarView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/features/appbar/AppBarView.tsx b/frontend/src/features/appbar/AppBarView.tsx index 4f89e4b..af03057 100644 --- a/frontend/src/features/appbar/AppBarView.tsx +++ b/frontend/src/features/appbar/AppBarView.tsx @@ -25,7 +25,7 @@ export default function AppBarView(){ {info.name} { - const [s, e] = Array.isArray(range) && range[1] ? range : [Date.now() - 24*3600*1000, Date.now()]; + const [s, e] = (Array.isArray(range) && range[0] && range[1]) ? [range[0], range[1]] : [new Date(Date.now() - 24*3600*1000), new Date()]; dispatch(setDateTimeRange({start: s.getTime(), end: e.getTime()})); }} value={[new Date(start), new Date(end)]}