1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-21 06:41:17 -04:00

remove format-number.ts

This commit is contained in:
2022-05-19 10:23:43 -04:00
parent d1f0030d3c
commit d288b2d5f5
5 changed files with 145 additions and 144 deletions

View File

@@ -1,7 +1,7 @@
import useSWR from "swr";
import commaNumber from "comma-number";
import Loading from "../Loading";
import { fetcher } from "../../lib/helpers/fetcher";
import { commafy } from "../../lib/helpers/format-number";
export type HitCounterProps = {
slug: string;
@@ -34,8 +34,8 @@ const HitCounter = ({ slug, className }: HitCounterProps) => {
// we have data!
return (
<span title={`${commafy(data.hits)} ${data.hits === 1 ? "view" : "views"}`} className={className}>
{commafy(data.hits)}
<span title={`${commaNumber(data.hits)} ${data.hits === 1 ? "view" : "views"}`} className={className}>
{commaNumber(data.hits)}
</span>
);
};