From fc0dc8aea070ed02076dbbf8e9f217c309e7083f Mon Sep 17 00:00:00 2001 From: Ajay Bura Date: Sun, 12 Sep 2021 20:42:51 +0530 Subject: [PATCH] Added abbreviateNumber for notfication count (#82) --- src/util/common.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/util/common.js b/src/util/common.js index 938ced54..f434c5b3 100644 --- a/src/util/common.js +++ b/src/util/common.js @@ -28,3 +28,8 @@ export function getEventCords(ev) { detail: ev.detail, }; } + +export function abbreviateNumber(number) { + if (number > 99) return '99+'; + return number; +}