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:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user