Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Card meta item tooltip number formatting #1342

Open
wants to merge 1 commit into
base: 02-22-fix_categorytagcloud_search_tag_styles
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { Community } from "@thunderstore/dapper/types";

import { numberWithSpaces, formatInteger } from "../../../utils/utils";
import { formatInteger } from "../../../utils/utils";
import { NewLink, NewIcon, Image, NewTag, NewMetaItem } from "../../..";
import { TooltipWrapper } from "../../../primitiveComponents/utils/utils";
import "./CardCommunity.css";
Expand Down Expand Up @@ -68,8 +68,9 @@ export function CardCommunity(props: Props) {
</NewLink>
<div className="card-community__meta">
<TooltipWrapper
tooltipText={`${numberWithSpaces(
community.total_package_count
tooltipText={`${formatInteger(
community.total_package_count,
"standard"
)} Packages`}
>
<NewMetaItem csSize="12">
Expand All @@ -80,8 +81,9 @@ export function CardCommunity(props: Props) {
</NewMetaItem>
</TooltipWrapper>
<TooltipWrapper
tooltipText={`${numberWithSpaces(
community.total_download_count
tooltipText={`${formatInteger(
community.total_download_count,
"standard"
)} Downloads`}
>
<NewMetaItem csSize="12">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { PackageListing } from "@thunderstore/dapper/types";

import { numberWithSpaces, formatInteger } from "../../../utils/utils";
import { formatInteger } from "../../../utils/utils";
import { NewLink, NewIcon, Image, NewTag, NewMetaItem } from "../../..";
import { TooltipWrapper } from "../../../primitiveComponents/utils/utils";
import "./CardPackage.css";
Expand Down Expand Up @@ -137,8 +137,9 @@ export function CardPackage(props: Props) {
<div className="card-package__footer">
<div className="card-package__meta">
<TooltipWrapper
tooltipText={`${numberWithSpaces(
packageData.download_count
tooltipText={`${formatInteger(
packageData.download_count,
"standard"
)} Downloads`}
>
<NewMetaItem csSize="12">
Expand All @@ -159,8 +160,9 @@ export function CardPackage(props: Props) {
</div>
</TooltipWrapper> */}
<TooltipWrapper
tooltipText={`${numberWithSpaces(
packageData.rating_count
tooltipText={`${formatInteger(
packageData.rating_count,
"standard"
)} Likes`}
>
<NewMetaItem csSize="12">
Expand Down
Loading