Updated color selection. Added loading to fetch hook.

This commit is contained in:
Mike Cao committed 2020-09-20 11:28:38 -07:00
1 parent 5524d504f4
commit 569fcc7f0b
7 files changed
+47 -27

No files matched your search

+2 -1
View File
@@ -23,7 +23,7 @@ export default function WebsiteChart({
const { startDate, endDate, unit, value, modified } = dateRange;
const [timezone] = useTimezone();
const { data } = useFetch(
const { data, loading } = useFetch(
`/api/website/${websiteId}/pageviews`,
{
start_at: +startDate,
@@ -74,6 +74,7 @@ export default function WebsiteChart({
data={{ pageviews, uniques }}
unit={unit}
records={getDateLength(startDate, endDate, unit)}
loading={loading}
/>
</div>
</div>