diff --git a/application/frontend/src/pages/Search/components/SearchResults.tsx b/application/frontend/src/pages/Search/components/SearchResults.tsx index a618da28c..2bea4d5fb 100644 --- a/application/frontend/src/pages/Search/components/SearchResults.tsx +++ b/application/frontend/src/pages/Search/components/SearchResults.tsx @@ -5,12 +5,17 @@ import { getDocumentDisplayName } from 'application/frontend/src/utils/document' export const SearchResults = ({ results }) => { if (results && results.length != 0) { + const sortedResults = results.sort((a, b) => getDocumentDisplayName(a).localeCompare(getDocumentDisplayName(b))) + let lastDocumentName = sortedResults[0].id ?? sortedResults[0].name return ( <> - {results.sort((a, b) => getDocumentDisplayName(a).localeCompare(getDocumentDisplayName(b))).map((document, i) => ( -
- -
+ {sortedResults.map((document, i) => ( + <> + {lastDocumentName !== (document.id ?? document.name) &&
} +
+ +
+ ))} );