some very minor refactoring/fixing

This commit is contained in:
2021-12-31 08:48:56 -05:00
parent 831f8ffe4c
commit 11d245ad66
19 changed files with 32 additions and 49 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ import useSWR from "swr";
import { fetcher } from "../../lib/fetcher";
import Loading from "../loading/Loading";
export default function Counter({ slug }) {
export default function Hits({ slug }) {
// start fetching repos from API immediately
const { data, error } = useSWR(`/api/hits/?slug=${encodeURIComponent(slug)}`, fetcher, {
// avoid double (or more) counting views