From 26b249ad2dd04372aa56103ac59f9ece2eb58f0c Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 13 Aug 2019 12:22:33 +0200 Subject: [Glitch] Fix short number formatting for numbers above million in web UI Port 0e9668051e58b2ff4e48b82fa7cc17d385c7a5c9 to glitch-soc Signed-off-by: Thibaut Girka --- app/javascript/flavours/glitch/util/numbers.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/javascript/flavours') diff --git a/app/javascript/flavours/glitch/util/numbers.js b/app/javascript/flavours/glitch/util/numbers.js index fdd8269ae..f7e4ceb93 100644 --- a/app/javascript/flavours/glitch/util/numbers.js +++ b/app/javascript/flavours/glitch/util/numbers.js @@ -4,7 +4,9 @@ import { FormattedNumber } from 'react-intl'; export const shortNumberFormat = number => { if (number < 1000) { return ; - } else { + } else if (number < 1000000) { return K; + } else { + return M; } }; -- cgit