mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-04-30 13:11:37 +03:00
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:
parent
bc9bccc669
commit
e5db33705d
4 changed files with 41 additions and 12 deletions
client/src/helpers
|
@ -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);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue