diff --git a/apps/HashRateGame/src/app/(telegram)/app/(main)/mining/_components/Information.tsx b/apps/HashRateGame/src/app/(telegram)/app/(main)/mining/_components/Information.tsx index ea56cbc..2a1997a 100644 --- a/apps/HashRateGame/src/app/(telegram)/app/(main)/mining/_components/Information.tsx +++ b/apps/HashRateGame/src/app/(telegram)/app/(main)/mining/_components/Information.tsx @@ -1,13 +1,46 @@ +import { TbCoins } from 'react-icons/tb' import addSuffixToNumber from '../../../../../../utils/addSuffixToNumber.util' export default function Information() { return (
Information
-
-
+
+
+
Total mined
+
+
+
+
+ {addSuffixToNumber(235_000)}/{addSuffixToNumber(1_000_000_000)} +
+
+
+
Status
+
+ Pending +
+
+
Complexity
-
{addSuffixToNumber(1647, 2)}
+
+ {addSuffixToNumber(1647, 2)} +
+
+
+
Income
+
+ {addSuffixToNumber(246.53)}/hr +
+
+ {addSuffixToNumber(10.07)}/hr +
+
+
+
Energy consumption
+
+ {addSuffixToNumber(53, 2)}/min +
diff --git a/apps/HashRateGame/src/app/(telegram)/app/(main)/mining/_components/Profile.tsx b/apps/HashRateGame/src/app/(telegram)/app/(main)/mining/_components/Profile.tsx index 5688208..c7e6720 100644 --- a/apps/HashRateGame/src/app/(telegram)/app/(main)/mining/_components/Profile.tsx +++ b/apps/HashRateGame/src/app/(telegram)/app/(main)/mining/_components/Profile.tsx @@ -6,7 +6,7 @@ export default function Profile() { <>
Profile
-
+
🤖 @@ -23,10 +23,10 @@ export default function Profile() {
Balance
-
+
{addSuffixToNumber(24648310.53)}
-
+
{addSuffixToNumber(107021.07)}
@@ -35,7 +35,7 @@ export default function Profile() {
-
+
{(1647).toLocaleString('en-US')}/{(10500).toLocaleString('en-US')}
diff --git a/apps/HashRateGame/src/utils/addSuffixToNumber.util.ts b/apps/HashRateGame/src/utils/addSuffixToNumber.util.ts index 403302f..b1f3a01 100644 --- a/apps/HashRateGame/src/utils/addSuffixToNumber.util.ts +++ b/apps/HashRateGame/src/utils/addSuffixToNumber.util.ts @@ -1,6 +1,6 @@ export default function addSuffixToNumber( number: number, - float: number = 3, + fixed: number = 3, ): string { const suffixes = ['', 'K', 'M', 'B', 'T', 'Q', 'S', 'O', 'N', 'D', 'U', 'D'] let suffixIndex = 0 @@ -11,7 +11,7 @@ export default function addSuffixToNumber( } if (number % 1 !== 0) { - return `${number.toFixed(float)}${suffixes[suffixIndex]}` + return `${number.toFixed(fixed)}${suffixes[suffixIndex]}` } else { return `${number.toFixed(0)}${suffixes[suffixIndex]}` }