From 4ff2a2939a134276d0bff4853b2bf1f2d08ce411 Mon Sep 17 00:00:00 2001 From: r-freeman Date: Tue, 17 Jan 2023 22:40:06 +0000 Subject: [PATCH] Updated views component --- src/components/Views.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/Views.tsx b/src/components/Views.tsx index 33d5500..3dbb26a 100644 --- a/src/components/Views.tsx +++ b/src/components/Views.tsx @@ -13,9 +13,7 @@ type ViewsType = { } export function Views({as: Component = 'span', slug}: { as?: ElementType, slug: string }) { - const {data} = useSWR(`/api/views/${slug}`, fetcher, { - revalidateOnFocus: false - }) + const {data} = useSWR(`/api/views/${slug}`, fetcher) const views = Number(data?.views) useEffect(() => {