projects
/
arvados-workbench2.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add possibility to filter favorites by type
[arvados-workbench2.git]
/
src
/
common
/
formatters.ts
diff --git
a/src/common/formatters.ts
b/src/common/formatters.ts
index fe7df14c9d12670a3a9c2f88480b6d6e519a902a..38ef0223e957f1b134d1dfed10c23341af145fbc 100644
(file)
--- a/
src/common/formatters.ts
+++ b/
src/common/formatters.ts
@@
-10,7
+10,7
@@
export const formatDate = (isoDate: string) => {
export const formatFileSize = (size?: number) => {
if (typeof size === "number") {
export const formatFileSize = (size?: number) => {
if (typeof size === "number") {
- for (const { base, unit } of
fileSizes
) {
+ for (const { base, unit } of
FILE_SIZES
) {
if (size >= base) {
return `${(size / base).toFixed()} ${unit}`;
}
if (size >= base) {
return `${(size / base).toFixed()} ${unit}`;
}
@@
-19,7
+19,7
@@
export const formatFileSize = (size?: number) => {
return "";
};
return "";
};
-const
fileSizes
= [
+const
FILE_SIZES
= [
{
base: 1000000000000,
unit: "TB"
{
base: 1000000000000,
unit: "TB"