Skip to content

Commit

Permalink
fix: fixes after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
strzelec committed Nov 7, 2024
1 parent 4a3f50b commit b2c0a3c
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import React from 'react';

import { type NumeralValue } from '~shared/Numeral/Numeral.tsx';
import { getFormattedNumeralValue } from '~shared/Numeral/helpers.tsx';
import { type NumeralValue } from '~shared/Numeral/types.ts';
import { convertToDecimal } from '~utils/convertToDecimal.ts';
import { formatText } from '~utils/intl.ts';
import { getFormattedTokenAmount } from '~v5/common/CompletedAction/partials/utils.ts';
import WidgetBox from '~v5/common/WidgetBox/WidgetBox.tsx';

export interface StatsCardsProps {
Expand All @@ -24,6 +25,10 @@ const StatsCards = ({
prefix,
suffix,
}: StatsCardsProps) => {
const streamingPerMonthDecimal = convertToDecimal(streamingPerMonth, 0);
const totalStreamedDecimal = convertToDecimal(totalStreamed, 0);
const unclaimedFoundsDecimal = convertToDecimal(unclaimedFounds, 0);

return (
<div className="mt-6 flex flex-col gap-2 md:mt-0 md:flex-row md:gap-6">
<WidgetBox
Expand All @@ -35,7 +40,7 @@ const StatsCards = ({
<div className="flex">
<h4 className="font-semibold heading-4">{prefix}</h4>
<p className="self-center font-semibold heading-4">
{getFormattedTokenAmount(`${streamingPerMonth}`, 0)}
{getFormattedNumeralValue(streamingPerMonthDecimal, 0)}
</p>
</div>
<p className="self-center text-1">{suffix} / month</p>
Expand All @@ -52,7 +57,7 @@ const StatsCards = ({
<div className="flex">
<h4 className="font-semibold heading-4">{prefix}</h4>
<p className="self-center font-semibold heading-4">
{getFormattedTokenAmount(`${totalStreamed}`, 0)}
{getFormattedNumeralValue(totalStreamedDecimal, 0)}
</p>
</div>
<p className="self-center text-1">{suffix}</p>
Expand All @@ -68,7 +73,7 @@ const StatsCards = ({
<div className="flex">
<h4 className="font-semibold heading-4">{prefix}</h4>
<p className="self-center font-semibold heading-4">
{getFormattedTokenAmount(`${unclaimedFounds}`, 0)}
{getFormattedNumeralValue(unclaimedFoundsDecimal, 0)}
</p>
</div>
<p className="self-center text-1">{suffix}</p>
Expand Down

0 comments on commit b2c0a3c

Please sign in to comment.