diff --git a/studio/components/to-be-cleaned/Storage/Storage.constants.ts b/studio/components/to-be-cleaned/Storage/Storage.constants.ts index c5af6131fa3..513504943c3 100644 --- a/studio/components/to-be-cleaned/Storage/Storage.constants.ts +++ b/studio/components/to-be-cleaned/Storage/Storage.constants.ts @@ -10,6 +10,11 @@ export const STORAGE_SORT_BY = { LAST_ACCESSED_AT: 'last_accessed_at', } +export const STORAGE_SORT_BY_ORDER = { + ASC: 'asc', + DESC: 'desc', +} + export const STORAGE_ROW_TYPES = { BUCKET: 'BUCKET', FILE: 'FILE', diff --git a/studio/components/to-be-cleaned/Storage/StorageExplorer/ColumnContextMenu.js b/studio/components/to-be-cleaned/Storage/StorageExplorer/ColumnContextMenu.js index eb372839f15..93e3c5260ec 100644 --- a/studio/components/to-be-cleaned/Storage/StorageExplorer/ColumnContextMenu.js +++ b/studio/components/to-be-cleaned/Storage/StorageExplorer/ColumnContextMenu.js @@ -1,7 +1,7 @@ import { Menu, Item, Separator, Submenu } from 'react-contexify' import 'react-contexify/dist/ReactContexify.css' -import { STORAGE_VIEWS, STORAGE_SORT_BY } from '../Storage.constants' +import { STORAGE_VIEWS, STORAGE_SORT_BY, STORAGE_SORT_BY_ORDER } from '../Storage.constants' const ColumnContextMenu = ({ id = '', @@ -9,6 +9,7 @@ const ColumnContextMenu = ({ onSelectAllItems = () => {}, onSelectView = () => {}, onSelectSort = () => {}, + onSelectSortByOrder = () => {}, }) => { return (
) } diff --git a/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorer.js b/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorer.js index 3123b00ef11..c76f2d2a2e4 100644 --- a/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorer.js +++ b/studio/components/to-be-cleaned/Storage/StorageExplorer/FileExplorer.js @@ -29,6 +29,7 @@ const FileExplorer = ({ onSelectCreateFolder = () => {}, onChangeView = () => {}, onChangeSortBy = () => {}, + onChangeSortByOrder = () => {}, onColumnLoadMore = () => {}, }) => { const fileExplorerRef = useRef(null) @@ -53,6 +54,7 @@ const FileExplorer = ({ onSelectAllItems={onSelectAllItemsInColumn} onSelectView={onChangeView} onSelectSort={onChangeSortBy} + onSelectSortByOrder={onChangeSortByOrder} />