diff --git a/components/input/WebsiteDateFilter.js b/components/input/WebsiteDateFilter.js index 88f4bd85..91721974 100644 --- a/components/input/WebsiteDateFilter.js +++ b/components/input/WebsiteDateFilter.js @@ -13,7 +13,9 @@ export default function WebsiteDateFilter({ websiteId }) { const data = await get(`/websites/${websiteId}`); if (data) { - setDateRange(`range:${new Date(data.createdAt)}:${Date.now()}`); + const start = new Date(data.createdAt).getTime(); + const end = Date.now(); + setDateRange(`range:${start}:${end}`); } } else if (value !== 'all') { setDateRange(value); @@ -27,6 +29,7 @@ export default function WebsiteDateFilter({ websiteId }) { startDate={startDate} endDate={endDate} onChange={handleChange} + showAllTime={true} /> ); } diff --git a/components/pages/reports/BaseParameters.js b/components/pages/reports/BaseParameters.js index 5dbe0f60..394432cf 100644 --- a/components/pages/reports/BaseParameters.js +++ b/components/pages/reports/BaseParameters.js @@ -33,7 +33,6 @@ export function BaseParameters() { startDate={startDate} endDate={endDate} onChange={handleDateChange} - showAllTime /> diff --git a/components/pages/websites/WebsiteMetricsBar.js b/components/pages/websites/WebsiteMetricsBar.js index 12cab24b..3683310c 100644 --- a/components/pages/websites/WebsiteMetricsBar.js +++ b/components/pages/websites/WebsiteMetricsBar.js @@ -1,7 +1,6 @@ -import { useState } from 'react'; import classNames from 'classnames'; import { Row, Column } from 'react-basics'; -import { formatShortTime, formatNumber, formatLongNumber } from 'lib/format'; +import { formatShortTime } from 'lib/format'; import MetricCard from 'components/metrics/MetricCard'; import RefreshButton from 'components/input/RefreshButton'; import WebsiteDateFilter from 'components/input/WebsiteDateFilter';