mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-07-22 21:35:57 -04:00
remove format-number.ts
This commit is contained in:
@@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import commaNumber from "comma-number";
|
||||
import Link from "../Link";
|
||||
import RelativeTime from "../RelativeTime";
|
||||
import { StarOcticon, ForkOcticon } from "../Icons";
|
||||
import { commafy } from "../../lib/helpers/format-number";
|
||||
import { styled } from "../../lib/styles/stitches.config";
|
||||
import type { Repository } from "../../types";
|
||||
|
||||
@@ -100,12 +100,12 @@ const RepositoryCard = ({
|
||||
<MetaItem>
|
||||
<MetaLink
|
||||
href={`${url}/stargazers`}
|
||||
title={`${commafy(stars)} ${stars === 1 ? "star" : "stars"}`}
|
||||
title={`${commaNumber(stars)} ${stars === 1 ? "star" : "stars"}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<MetaIcon as={StarOcticon} />
|
||||
<span>{commafy(stars)}</span>
|
||||
<span>{commaNumber(stars)}</span>
|
||||
</MetaLink>
|
||||
</MetaItem>
|
||||
)}
|
||||
@@ -114,12 +114,12 @@ const RepositoryCard = ({
|
||||
<MetaItem>
|
||||
<MetaLink
|
||||
href={`${url}/network/members`}
|
||||
title={`${commafy(forks)} ${forks === 1 ? "fork" : "forks"}`}
|
||||
title={`${commaNumber(forks)} ${forks === 1 ? "fork" : "forks"}`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<MetaIcon as={ForkOcticon} />
|
||||
<span>{commafy(forks)}</span>
|
||||
<span>{commaNumber(forks)}</span>
|
||||
</MetaLink>
|
||||
</MetaItem>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user