Skip to content

Commit

Permalink
[Issue-164] Update number seperator
Browse files Browse the repository at this point in the history
  • Loading branch information
dungnguyen-art committed Nov 22, 2024
1 parent 1bc83b4 commit 6074b0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { Achievement, AchievementLogStatus, BookaAccount, Task, TaskAction, Task
import { TelegramConnector } from '@subwallet/extension-koni-ui/connector/telegram';
import { useNotification } from '@subwallet/extension-koni-ui/hooks';
import { ThemeProps } from '@subwallet/extension-koni-ui/types';
import { toDisplayNumber } from '@subwallet/extension-koni-ui/utils';
import { actionTaskOnChain } from '@subwallet/extension-koni-ui/utils/game/task';
import React, { useCallback, useMemo } from 'react';
import { useTranslation } from 'react-i18next';
Expand Down Expand Up @@ -259,7 +260,7 @@ const Component = ({ accountInfo,
if (firstProcessItem) {
const completed = Math.min(firstProcessItem.completed || 0, firstProcessItem.required);

return `${completed}/${firstProcessItem.required} ${getMetricCounterpart(firstProcessItem.metricId, achievement)}`.trim();
return `${toDisplayNumber(completed)}/${toDisplayNumber(firstProcessItem.required)} ${getMetricCounterpart(firstProcessItem.metricId, achievement)}`.trim();
}

return '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import { MythButton } from '@subwallet/extension-koni-ui/components/Mythical';
import { ThemeProps } from '@subwallet/extension-koni-ui/types';
import { toDisplayNumber } from '@subwallet/extension-koni-ui/utils';
import CN from 'classnames';
import React, { useCallback, useState } from 'react';
import styled from 'styled-components';
Expand Down Expand Up @@ -78,7 +79,7 @@ const Component = ({ actionContent, className,
}

<div className='__point'>
+{Number(point).toLocaleString()}
+{toDisplayNumber(point)}

{
state === 'CLAIMABLE' && (
Expand Down

0 comments on commit 6074b0e

Please sign in to comment.