diff --git a/frontend/src/Search/Menus/SearchIndexFilterMenu.js b/frontend/src/Search/Menus/SearchIndexFilterMenu.tsx similarity index 89% rename from frontend/src/Search/Menus/SearchIndexFilterMenu.js rename to frontend/src/Search/Menus/SearchIndexFilterMenu.tsx index 67c73ae76..52806ff83 100644 --- a/frontend/src/Search/Menus/SearchIndexFilterMenu.js +++ b/frontend/src/Search/Menus/SearchIndexFilterMenu.tsx @@ -10,7 +10,7 @@ function SearchIndexFilterMenu(props) { filters, customFilters, isDisabled, - onFilterSelect + onFilterSelect, } = props; return ( @@ -27,15 +27,16 @@ function SearchIndexFilterMenu(props) { } SearchIndexFilterMenu.propTypes = { - selectedFilterKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired, + selectedFilterKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]) + .isRequired, filters: PropTypes.arrayOf(PropTypes.object).isRequired, customFilters: PropTypes.arrayOf(PropTypes.object).isRequired, isDisabled: PropTypes.bool.isRequired, - onFilterSelect: PropTypes.func.isRequired + onFilterSelect: PropTypes.func.isRequired, }; SearchIndexFilterMenu.defaultProps = { - showCustomFilters: false + showCustomFilters: false, }; export default SearchIndexFilterMenu; diff --git a/frontend/src/Search/Menus/SearchIndexSortMenu.js b/frontend/src/Search/Menus/SearchIndexSortMenu.tsx similarity index 91% rename from frontend/src/Search/Menus/SearchIndexSortMenu.js rename to frontend/src/Search/Menus/SearchIndexSortMenu.tsx index 10af7a813..302ef6a10 100644 --- a/frontend/src/Search/Menus/SearchIndexSortMenu.js +++ b/frontend/src/Search/Menus/SearchIndexSortMenu.tsx @@ -7,18 +7,10 @@ import { align, sortDirections } from 'Helpers/Props'; import translate from 'Utilities/String/translate'; function SearchIndexSortMenu(props) { - const { - sortKey, - sortDirection, - isDisabled, - onSortSelect - } = props; + const { sortKey, sortDirection, isDisabled, onSortSelect } = props; return ( - + - {protocolName} - - ); -} - -ProtocolLabel.propTypes = { - protocol: PropTypes.string.isRequired -}; - -export default ProtocolLabel; diff --git a/frontend/src/Search/Table/SearchIndexHeader.css b/frontend/src/Search/Table/SearchIndexHeader.css index e638dedd5..7f90ef9a1 100644 --- a/frontend/src/Search/Table/SearchIndexHeader.css +++ b/frontend/src/Search/Table/SearchIndexHeader.css @@ -4,7 +4,7 @@ flex: 0 0 90px; } -.title { +.sortTitle { composes: headerCell from '~Components/Table/VirtualTableHeaderCell.css'; flex: 4 0 110px; diff --git a/frontend/src/Search/Table/SearchIndexHeader.css.d.ts b/frontend/src/Search/Table/SearchIndexHeader.css.d.ts index 73ea36855..7da27c06c 100644 --- a/frontend/src/Search/Table/SearchIndexHeader.css.d.ts +++ b/frontend/src/Search/Table/SearchIndexHeader.css.d.ts @@ -11,7 +11,7 @@ interface CssExports { 'peers': string; 'protocol': string; 'size': string; - 'title': string; + 'sortTitle': string; } export const cssExports: CssExports; export default cssExports; diff --git a/frontend/src/Search/Table/SearchIndexRow.css b/frontend/src/Search/Table/SearchIndexRow.css index 4ad142f4d..2e8282268 100644 --- a/frontend/src/Search/Table/SearchIndexRow.css +++ b/frontend/src/Search/Table/SearchIndexRow.css @@ -11,7 +11,7 @@ flex: 0 0 90px; } -.title { +.sortTitle { composes: cell; flex: 4 0 110px; diff --git a/frontend/src/Search/Table/SearchIndexRow.css.d.ts b/frontend/src/Search/Table/SearchIndexRow.css.d.ts index 54cc9d675..6d625f58a 100644 --- a/frontend/src/Search/Table/SearchIndexRow.css.d.ts +++ b/frontend/src/Search/Table/SearchIndexRow.css.d.ts @@ -15,7 +15,7 @@ interface CssExports { 'peers': string; 'protocol': string; 'size': string; - 'title': string; + 'sortTitle': string; } export const cssExports: CssExports; export default cssExports; diff --git a/frontend/src/Search/Table/SearchIndexRow.js b/frontend/src/Search/Table/SearchIndexRow.js index 2645c02eb..1b740b5da 100644 --- a/frontend/src/Search/Table/SearchIndexRow.js +++ b/frontend/src/Search/Table/SearchIndexRow.js @@ -8,6 +8,7 @@ import VirtualTableRowCell from 'Components/Table/Cells/VirtualTableRowCell'; import VirtualTableSelectCell from 'Components/Table/Cells/VirtualTableSelectCell'; import Popover from 'Components/Tooltip/Popover'; import { icons, kinds, tooltipPositions } from 'Helpers/Props'; +import ProtocolLabel from 'Indexer/Index/Table/ProtocolLabel'; import formatDateTime from 'Utilities/Date/formatDateTime'; import formatAge from 'Utilities/Number/formatAge'; import formatBytes from 'Utilities/Number/formatBytes'; @@ -15,7 +16,6 @@ import titleCase from 'Utilities/String/titleCase'; import translate from 'Utilities/String/translate'; import CategoryLabel from './CategoryLabel'; import Peers from './Peers'; -import ProtocolLabel from './ProtocolLabel'; import styles from './SearchIndexRow.css'; function getDownloadIcon(isGrabbing, isGrabbed, grabError) { @@ -165,7 +165,7 @@ class SearchIndexRow extends Component { ); } - if (column.name === 'title') { + if (column.name === 'sortTitle') { return (