separate page/site stats API endpoints to lower memory usage

This commit is contained in:
jake committed 2022-07-10 17:26:22 -04:00
1 parent 87305b5424
commit 9be41b5e5c
6 files changed
+58 -44

No files matched your search

+1 -1
View File
@@ -12,7 +12,7 @@ const HitCounter = ({ slug }: HitCounterProps) => {
// use immutable SWR to avoid double (or more) counting views:
// https://swr.vercel.app/docs/revalidation#disable-automatic-revalidations
const { data, error } = useSWRImmutable<PageStats>(
`/api/hits/?${new URLSearchParams({
`/api/count/?${new URLSearchParams({
slug,
})}`,
fetcher