chore: depoly model ux
This commit is contained in:
@@ -155,3 +155,16 @@ export const platformCall = () => {
|
||||
isWin: isWin()
|
||||
};
|
||||
};
|
||||
|
||||
export const formatNumber = (num: number) => {
|
||||
if (!num) {
|
||||
return '0';
|
||||
}
|
||||
if (num >= 1000000) {
|
||||
return (num / 1000000).toFixed(2) + 'M';
|
||||
} else if (num >= 1000) {
|
||||
return (num / 1000).toFixed(2) + 'k';
|
||||
} else {
|
||||
return num.toString();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user