Skip to content

Commit

Permalink
Merge pull request #15 from WeFoxTech/feature/disable-decimal-bit
Browse files Browse the repository at this point in the history
disable decimal bit 💯
  • Loading branch information
foxundermoon authored Mar 22, 2020
2 parents 17865a3 + 13ab7d6 commit 6a54307
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/website/components/tool/ByteConverter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ export const ByteConverter: React.FC = () => {
const key = ele as UnitKey;
return [
key,
fixedType[key] ?? ns?.dividedBy(units[key]).toString(10) ?? '',
fixedType[key] ??
(key === 'bit' ? ns?.toFixed(0) ?? '' : ns?.dividedBy(units[key]).toString(10) ?? ''),
(e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) =>
checkAndSetNs(key, e.currentTarget.value, bn => bn.multipliedBy(units[key])),
];
Expand Down

1 comment on commit 6a54307

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for website ready!

Built with commit 6a54307

https://home-website-epxdipckg.now.sh

Please sign in to comment.