mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-01-14 10:42:56 -05:00
separate page/site stats API endpoints to lower memory usage
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user