diff --git a/packages/ui-components/src/components/Search/SearchItem.tsx b/packages/ui-components/src/components/Search/SearchItem.tsx index 5606122c2..a94342821 100644 --- a/packages/ui-components/src/components/Search/SearchItem.tsx +++ b/packages/ui-components/src/components/Search/SearchItem.tsx @@ -9,6 +9,7 @@ import Stack from '@mui/material/Stack'; import React from 'react'; import { useTranslation } from 'react-i18next'; +import { useConfig } from '../../'; import { cleanDescription } from './utils'; type SearchItemProps = { @@ -74,6 +75,7 @@ const SearchItem: React.FC = ({ ...props }) => { const { t } = useTranslation(); + const { configOptions } = useConfig(); const handleDelete = () => { // no action assigned by default }; @@ -87,37 +89,39 @@ const SearchItem: React.FC = ({ {version && {version}} - - - {isPrivate && ( - } - label={t('search.isPrivate')} - onDelete={handleDelete} - size="small" - /> - )} - {isRemote && !isPrivate && ( - } - label={t('search.isRemote')} - onDelete={handleDelete} - size="small" - variant="outlined" - /> - )} - {isCached && ( - } - label={t('search.isCached')} - onDelete={handleDelete} - size="small" - variant="outlined" - /> - )} - - + {configOptions?.showUplinks && ( + + + {isPrivate && ( + } + label={t('search.isPrivate')} + onDelete={handleDelete} + size="small" + /> + )} + {isRemote && !isPrivate && ( + } + label={t('search.isRemote')} + onDelete={handleDelete} + size="small" + variant="outlined" + /> + )} + {isCached && ( + } + label={t('search.isCached')} + onDelete={handleDelete} + size="small" + variant="outlined" + /> + )} + + + )} ); };