1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-11-23 12:26:07 -05:00

refactor constants

This commit is contained in:
2025-04-11 14:50:15 -04:00
parent 0ade75716e
commit 37fa6101f6
11 changed files with 54 additions and 37 deletions

View File

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