Fix panel sorting
[arvados-workbench2.git] / src / common / formatters.ts
index fe7df14c9d12670a3a9c2f88480b6d6e519a902a..38ef0223e957f1b134d1dfed10c23341af145fbc 100644 (file)
@@ -10,7 +10,7 @@ export const formatDate = (isoDate: string) => {
 
 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}`;
             }
@@ -19,7 +19,7 @@ export const formatFileSize = (size?: number) => {
     return "";
 };
 
-const fileSizes = [
+const FILE_SIZES = [
     {
         base: 1000000000000,
         unit: "TB"