From 5103da331ae5f4ed9ad83a9534c498cba107a034 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Mon, 3 Apr 2023 03:12:12 -0700 Subject: [PATCH] Remove visible check. --- components/metrics/PageviewsChart.js | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/components/metrics/PageviewsChart.js b/components/metrics/PageviewsChart.js index f9cf52b0..c3c1d6fa 100644 --- a/components/metrics/PageviewsChart.js +++ b/components/metrics/PageviewsChart.js @@ -1,8 +1,7 @@ import { useMemo } from 'react'; -import { useVisible } from 'react-basics'; import { colord } from 'colord'; import BarChart from './BarChart'; -import { THEME_COLORS, DEFAULT_ANIMATION_DURATION } from 'lib/constants'; +import { THEME_COLORS } from 'lib/constants'; import useTheme from 'hooks/useTheme'; import useMessages from 'hooks/useMessages'; @@ -13,12 +12,10 @@ export default function PageviewsChart({ records, className, loading, - animationDuration = DEFAULT_ANIMATION_DURATION, ...props }) { const { formatMessage, labels } = useMessages(); const [theme] = useTheme(); - const { ref, visible } = useVisible(); const colors = useMemo(() => { const primaryColor = colord(THEME_COLORS[theme].primary); @@ -58,17 +55,14 @@ export default function PageviewsChart({ }, [data]); return ( -
- -
+ ); }