From 7fbb3f2075737919d8c7690f998d803fef8e48c9 Mon Sep 17 00:00:00 2001 From: Priyanka Terala Date: Wed, 3 Apr 2024 17:56:41 +0530 Subject: [PATCH] UIU-3096 - cleanup --- .../ReadingRoomAccess/ReadingRoomAccess.js | 20 ++----------------- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/src/components/UserDetailSections/ReadingRoomAccess/ReadingRoomAccess.js b/src/components/UserDetailSections/ReadingRoomAccess/ReadingRoomAccess.js index 77d8580a9..cff0038a2 100644 --- a/src/components/UserDetailSections/ReadingRoomAccess/ReadingRoomAccess.js +++ b/src/components/UserDetailSections/ReadingRoomAccess/ReadingRoomAccess.js @@ -2,7 +2,7 @@ import React, { useState } from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage, useIntl } from 'react-intl'; // import { Link } from 'react-router-dom'; -import { get, orderBy } from 'lodash'; +// import { get } from 'lodash'; import { Accordion, @@ -13,7 +13,7 @@ import { SearchField, } from '@folio/stripes/components'; // import { ViewMetaData } from '@folio/stripes/smart-components'; -import { READING_ROOM_ACCESS, SORT_DIRECTIONS } from '../../../constants'; +import { READING_ROOM_ACCESS } from '../../../constants'; // import css from './ReadingRoom.css'; const mockedRRAData = [ @@ -50,8 +50,6 @@ const mockedRRAData = [ const ReadingRoomAccess = (props) => { const intl = useIntl(); const [filteredRRA, setFilteredRRA] = useState(mockedRRAData); - const [sortedColumn, setSortedColumn] = useState('access'); - const [sortOrder, setSortOrder] = useState(SORT_DIRECTIONS.asc.name); const { accordionId, @@ -118,17 +116,6 @@ const ReadingRoomAccess = (props) => { // ) id: rra => }; - const onHeaderClick = (e, { name: columnName }) => { - if (sortedColumn !== columnName) { - setSortedColumn(columnName); - setSortOrder(SORT_DIRECTIONS.desc.name); - } else { - const newSortOrder = (sortOrder === SORT_DIRECTIONS.desc.name) - ? SORT_DIRECTIONS.asc.name - : SORT_DIRECTIONS.desc.name; - setSortOrder(newSortOrder); - } - }; return ( { columnMapping={columnMapping} visibleColumns={visibleColumns} formatter={formatter} - sortedColumn={sortedColumn} - onHeaderClick={onHeaderClick} - sortDirection={SORT_DIRECTIONS[sortOrder].fullName} /> );