1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-09-16 19:15:34 -04:00

trim some unnecessary dependencies

This commit is contained in:
2025-04-07 12:11:04 -04:00
parent 80793c7330
commit 53d6f57699
19 changed files with 256 additions and 300 deletions

View File

@@ -1,7 +1,7 @@
import { connection } from "next/server";
import commaNumber from "comma-number";
import CountUp from "../../../components/CountUp";
import redis from "../../../lib/helpers/redis";
import { siteLocale } from "../../../lib/config";
const HitCounter = async ({ slug }: { slug: string }) => {
await connection();
@@ -16,8 +16,8 @@ const HitCounter = async ({ slug }: { slug: string }) => {
// we have data!
return (
<span title={`${commaNumber(hits)} ${hits === 1 ? "view" : "views"}`}>
<CountUp start={0} end={hits} delay={0} duration={2.5} />
<span title={`${Intl.NumberFormat(siteLocale || "en-US").format(hits)} ${hits === 1 ? "view" : "views"}`}>
<CountUp start={0} end={hits} delay={0} duration={1.5} />
</span>
);
} catch (error) {