Added metrics bar and date range to sessions.
This commit is contained in:
@@ -2,7 +2,7 @@ import { useMemo } from 'react';
|
||||
import { colord } from 'colord';
|
||||
import BarChart from 'components/charts/BarChart';
|
||||
import { getDateArray } from 'lib/date';
|
||||
import { useLocale, useDateRange, useWebsiteEvents } from 'components/hooks';
|
||||
import { useLocale, useDateRange, useWebsiteEventsSeries } from 'components/hooks';
|
||||
import { CHART_COLORS } from 'lib/constants';
|
||||
import { renderDateLabels } from 'lib/charts';
|
||||
|
||||
@@ -16,7 +16,7 @@ export function EventsChart({ websiteId, className }: EventsChartProps) {
|
||||
dateRange: { startDate, endDate, unit },
|
||||
} = useDateRange(websiteId);
|
||||
const { locale } = useLocale();
|
||||
const { data, isLoading } = useWebsiteEvents(websiteId);
|
||||
const { data, isLoading } = useWebsiteEventsSeries(websiteId);
|
||||
|
||||
const chartData = useMemo(() => {
|
||||
if (!data) return [];
|
||||
|
||||
@@ -10,7 +10,7 @@ export interface MetricCardProps {
|
||||
change?: number;
|
||||
label?: string;
|
||||
reverseColors?: boolean;
|
||||
formatValue?: typeof formatNumber;
|
||||
formatValue?: (n: any) => string;
|
||||
showLabel?: boolean;
|
||||
showChange?: boolean;
|
||||
showPrevious?: boolean;
|
||||
|
||||
@@ -25,7 +25,7 @@ export function PagesTable({ allowFilter, ...props }: PagesTableProps) {
|
||||
|
||||
const buttons = [
|
||||
{
|
||||
label: 'URL',
|
||||
label: formatMessage(labels.path),
|
||||
key: 'url',
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user