diff --git a/apps/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerColumn.tsx b/apps/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerColumn.tsx
index 3bb49eb2f85..95ccbb7455f 100644
--- a/apps/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerColumn.tsx
+++ b/apps/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorerColumn.tsx
@@ -1,15 +1,15 @@
import { Transition } from '@headlessui/react'
import { get, noop, sum } from 'lodash'
+import { Upload } from 'lucide-react'
import { useEffect, useRef, useState } from 'react'
import { useContextMenu } from 'react-contexify'
-import { Checkbox } from 'ui'
import InfiniteList from 'components/ui/InfiniteList'
import ShimmeringLoader from 'components/ui/ShimmeringLoader'
import { BASE_PATH } from 'lib/constants'
import { formatBytes } from 'lib/helpers'
-import { Upload } from 'lucide-react'
import { useStorageExplorerStateSnapshot } from 'state/storage-explorer'
+import { Checkbox, cn } from 'ui'
import {
CONTEXT_MENU_KEYS,
STORAGE_ROW_STATUS,
@@ -142,145 +142,133 @@ const FileExplorerColumn = ({
)
return (
- <>
-
{
- const eventTarget = get(event.target, ['className'], '')
- if (typeof eventTarget === 'string' && eventTarget.includes('react-contexify')) return
- onSelectColumnEmptySpace(index)
- }}
- >
- {/* Checkbox selection for select all */}
- {view === STORAGE_VIEWS.COLUMNS && (
-
event.stopPropagation()}
- >
- {columnFiles.length > 0 ? (
- <>
-
-
- Select all {columnFiles.length} files
-
- >
- ) : (
-
No files available for selection
- )}
-
- )}
-
- {/* List Interface Header */}
- {view === STORAGE_VIEWS.LIST && (
-
-
+
{
+ const eventTarget = get(event.target, ['className'], '')
+ if (typeof eventTarget === 'string' && eventTarget.includes('react-contexify')) return
+ onSelectColumnEmptySpace(index)
+ }}
+ >
+ {/* Checkbox selection for select all */}
+ {view === STORAGE_VIEWS.COLUMNS && (
+
event.stopPropagation()}
+ >
+ {columnFiles.length > 0 ? (
+ <>
-
Name
-
-
Size
-
Type
-
Created at
-
Last modified at
-
- )}
+
Select all {columnFiles.length} files
+ >
+ ) : (
+
No files available for selection
+ )}
+
+ )}
- {/* Shimmering loaders while fetching contents */}
- {column.status === STORAGE_ROW_STATUS.LOADING && (
-
+
+
Size
+
Type
+
Created at
+
Last modified at
+
+ )}
+
+ {/* Shimmering loaders while fetching contents */}
+ {column.status === STORAGE_ROW_STATUS.LOADING && (
+
-
-
-
+ >
+
+
+
+
+ )}
+
+ {/* Column Interface */}
+
(index !== 0 && index === columnItems.length ? 85 : 37)}
+ hasNextPage={column.status !== STORAGE_ROW_STATUS.LOADING && column.hasMoreItems}
+ isLoadingNextPage={column.isLoadingMoreItems}
+ onLoadNextPage={() => onColumnLoadMore(index, column)}
+ />
+
+ {/* Drag drop upload CTA for when column is empty */}
+ {!(snap.isSearching && itemSearchString.length > 0) &&
+ column.items.length === 0 &&
+ column.status !== STORAGE_ROW_STATUS.LOADING && (
+
+

+
Drop your files here
+
+ Or upload them via the "Upload file" button above
+
)}
- {/* Column Interface */}
- (index !== 0 && index === columnItems.length ? 85 : 37)}
- hasNextPage={column.status !== STORAGE_ROW_STATUS.LOADING && column.hasMoreItems}
- isLoadingNextPage={column.isLoadingMoreItems}
- onLoadNextPage={() => onColumnLoadMore(index, column)}
- />
+ {snap.isSearching &&
+ itemSearchString.length > 0 &&
+ isEmpty &&
+ column.status !== STORAGE_ROW_STATUS.LOADING && (
+
+
No results found in this folder
+
+ Your search for "{itemSearchString}" did not return any results
+
+
+ )}
- {/* Drag drop upload CTA for when column is empty */}
- {!(snap.isSearching && itemSearchString.length > 0) &&
- column.items.length === 0 &&
- column.status !== STORAGE_ROW_STATUS.LOADING && (
-
-

-
Drop your files here
-
- Or upload them via the "Upload file" button above
-
-
- )}
+ {/* Drag drop upload CTA for when column has files */}
+ setIsDraggedOver(false)}
+ onDrop={() => setIsDraggedOver(false)}
+ />
- {snap.isSearching &&
- itemSearchString.length > 0 &&
- isEmpty &&
- column.status !== STORAGE_ROW_STATUS.LOADING && (
-
-
No results found in this folder
-
- Your search for "{itemSearchString}" did not return any results
-
-
- )}
-
- {/* Drag drop upload CTA for when column has files */}
- setIsDraggedOver(false)}
- onDrop={() => setIsDraggedOver(false)}
- />
-
{/* List interface footer */}
{view === STORAGE_VIEWS.LIST && (
-
+
{formatBytes(columnItemsSize)} for {columnItems.length} items
)}
- >
+
)
}
diff --git a/apps/studio/components/to-be-cleaned/Storage/StorageExplorer/StorageExplorer.tsx b/apps/studio/components/to-be-cleaned/Storage/StorageExplorer/StorageExplorer.tsx
index e55cb48a772..bc34848e6eb 100644
--- a/apps/studio/components/to-be-cleaned/Storage/StorageExplorer/StorageExplorer.tsx
+++ b/apps/studio/components/to-be-cleaned/Storage/StorageExplorer/StorageExplorer.tsx
@@ -1,8 +1,8 @@
-import { useParams } from 'common'
import { compact, get, isEmpty, uniqBy } from 'lodash'
import { observer } from 'mobx-react-lite'
import { useEffect, useRef, useState } from 'react'
+import { useParams } from 'common'
import { useProjectStorageConfigQuery } from 'data/config/project-storage-config-query'
import type { Bucket } from 'data/storage/buckets-query'
import { IS_PLATFORM } from 'lib/constants'