fix
Some checks failed
Deploy Backend / deploy (push) Successful in 4m14s
Deploy Website / deploy (push) Failing after 2m42s

This commit is contained in:
Lee
2024-10-15 19:43:23 +01:00
parent 970ab22e2f
commit f2ef170f01
14 changed files with 33 additions and 32 deletions

View File

@ -1,19 +0,0 @@
/**
* Formats a number without trailing zeros.
*
* @param num the number to format
* @returns the formatted number
*/
export function formatNumberWithCommas(num: number) {
return num.toLocaleString();
}
/**
* Formats the pp value
*
* @param num the pp to format
* @returns the formatted pp
*/
export function formatPp(num: number) {
return num.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 });
}

View File

@ -1,6 +1,6 @@
"use client";
import { formatNumberWithCommas } from "@/common/number-utils";
import { formatNumberWithCommas } from "@ssr/common/utils/number-utils";
import { zodResolver } from "@hookform/resolvers/zod";
import Link from "next/link";
import { useState } from "react";

View File

@ -1,4 +1,4 @@
import { formatNumberWithCommas } from "@/common/number-utils";
import { formatNumberWithCommas } from "@ssr/common/utils/number-utils";
import { XMarkIcon } from "@heroicons/react/24/solid";
import clsx from "clsx";
import { getScoreBadgeFromAccuracy } from "@/common/song-utils";

View File

@ -1,6 +1,6 @@
"use client";
import { formatNumberWithCommas } from "@/common/number-utils";
import { formatNumberWithCommas } from "@ssr/common/utils/number-utils";
import React from "react";
import { DatasetConfig } from "@/components/chart/generic-chart";
import GenericPlayerChart from "@/components/player/chart/generic-player-chart";

View File

@ -1,4 +1,4 @@
import { formatNumberWithCommas, formatPp } from "@/common/number-utils";
import { formatNumberWithCommas, formatPp } from "@ssr/common/utils/number-utils";
import { GlobeAmericasIcon } from "@heroicons/react/24/solid";
import Card from "../card";
import CountryFlag from "../country-flag";

View File

@ -1,4 +1,4 @@
import { formatNumberWithCommas } from "@/common/number-utils";
import { formatNumberWithCommas } from "@ssr/common/utils/number-utils";
import StatValue from "@/components/stat-value";
import ScoreSaberPlayer from "@ssr/common/types/player/impl/scoresaber-player";

View File

@ -5,7 +5,7 @@ import ky from "ky";
import { config } from "../../../config";
import Tooltip from "@/components/tooltip";
import { InformationCircleIcon } from "@heroicons/react/16/solid";
import { formatNumberWithCommas } from "@/common/number-utils";
import { formatNumberWithCommas } from "@ssr/common/utils/number-utils";
import { PlayerTrackedSince } from "@ssr/common/types/player/player-tracked-since";
import ScoreSaberPlayer from "@ssr/common/types/player/impl/scoresaber-player";

View File

@ -1,4 +1,4 @@
import { formatNumberWithCommas, formatPp } from "@/common/number-utils";
import { formatNumberWithCommas, formatPp } from "@ssr/common/utils/number-utils";
import { GlobeAmericasIcon } from "@heroicons/react/24/solid";
import { useQuery } from "@tanstack/react-query";
import Link from "next/link";

View File

@ -1,6 +1,6 @@
"use client";
import { formatNumberWithCommas, formatPp } from "@/common/number-utils";
import { formatNumberWithCommas, formatPp } from "@ssr/common/utils/number-utils";
import CountryFlag from "@/components/country-flag";
import ScoreSaberPlayerToken from "@ssr/common/types/token/scoresaber/score-saber-player-token";
import Link from "next/link";

View File

@ -1,4 +1,4 @@
import { formatNumberWithCommas } from "@/common/number-utils";
import { formatNumberWithCommas } from "@ssr/common/utils/number-utils";
import { format } from "@formkit/tempo";
import { GlobeAmericasIcon } from "@heroicons/react/24/solid";
import Tooltip from "../tooltip";

View File

@ -1,4 +1,4 @@
import { formatNumberWithCommas, formatPp } from "@/common/number-utils";
import { formatNumberWithCommas, formatPp } from "@ssr/common/utils/number-utils";
import { getScoreBadgeFromAccuracy } from "@/common/song-utils";
import { XMarkIcon } from "@heroicons/react/24/solid";
import clsx from "clsx";