import classNames from "classnames"; import { intlFormat, formatDistanceToNowStrict } from "date-fns"; import { StarOcticon, ForkOcticon } from "../Icons"; import type { RepoType } from "../../types"; import styles from "./RepositoryCard.module.css"; type Props = RepoType & { className?: string; }; const RepositoryCard = ({ name, url, description, language, stars, forks, updatedAt, className }: Props) => (
{name} {description &&

{description}

}
{language && (
{language.name}
)} {stars > 0 && (
{stars.toLocaleString("en-US")}
)} {forks > 0 && (
{forks.toLocaleString("en-US")}
)}
Updated {formatDistanceToNowStrict(new Date(updatedAt), { addSuffix: true })}
); export default RepositoryCard;