From 71b105f9caff3d97ce015581a597676b7e446232 Mon Sep 17 00:00:00 2001 From: Alisher Musurmonov Date: Tue, 10 Oct 2023 18:32:03 +0500 Subject: [PATCH] refactor: hide button for shadow users --- src/components/LostItemsLink/LostItemsLink.js | 15 +--------- .../LostItemsLink/LostItemsLink.test.js | 30 +++++++------------ .../RequestFeeFineBlockButtons.js | 6 ---- .../RequestFeeFineBlockButtons.test.js | 7 ----- src/views/UserDetail/UserDetail.js | 20 +++++++------ 5 files changed, 22 insertions(+), 56 deletions(-) diff --git a/src/components/LostItemsLink/LostItemsLink.js b/src/components/LostItemsLink/LostItemsLink.js index 0f58dc279..d80cf6ad5 100644 --- a/src/components/LostItemsLink/LostItemsLink.js +++ b/src/components/LostItemsLink/LostItemsLink.js @@ -1,4 +1,3 @@ -import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import { useHistory } from 'react-router-dom'; @@ -14,13 +13,9 @@ import { LOST_ITEM_STATUSES, } from '../../views/LostItems/constants'; -const LostItemsLink = ({ disabled }) => { +const LostItemsLink = () => { const history = useHistory(); - if (disabled) { - return null; - } - return (