Merge: + client: add digit grouping for numbers on the dashboard
Closes #1423 Squashed commit of the following: commit 6e5de427c48577ebbe4d963f817b66fed9b29bb4 Author: Ildar Kamalov <i.kamalov@adguard.com> Date: Wed Mar 11 17:56:39 2020 +0300 + client: add digit grouping for numbers on the dashboard
This commit is contained in:
@@ -449,3 +449,12 @@ export const getCurrentFilter = (url, filters) => {
|
||||
|
||||
return { name: '', url: '' };
|
||||
};
|
||||
|
||||
/**
|
||||
* @param number Number to format
|
||||
* @returns string Returns a string with a language-sensitive representation of this number
|
||||
*/
|
||||
export const formatNumber = (num) => {
|
||||
const currentLanguage = i18n.languages[0] || DEFAULT_LANGUAGE;
|
||||
return num.toLocaleString(currentLanguage);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user