From 044eefd7b49081048b772909be9e3d4e0b55f792 Mon Sep 17 00:00:00 2001 From: Piotr Gawron <p.gawron@atcomp.pl> Date: Thu, 12 Dec 2024 15:25:39 +0100 Subject: [PATCH] resuse annotation list --- .../BioEntitiesPinsListItem.component.tsx | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/components/Map/Drawer/SearchDrawerWrapper/BioEntitiesResultsList/BioEntitiesPinsList/BioEntitiesPinsListItem/BioEntitiesPinsListItem.component.tsx b/src/components/Map/Drawer/SearchDrawerWrapper/BioEntitiesResultsList/BioEntitiesPinsList/BioEntitiesPinsListItem/BioEntitiesPinsListItem.component.tsx index 3f6e8439..d5764b93 100644 --- a/src/components/Map/Drawer/SearchDrawerWrapper/BioEntitiesResultsList/BioEntitiesPinsList/BioEntitiesPinsListItem/BioEntitiesPinsListItem.component.tsx +++ b/src/components/Map/Drawer/SearchDrawerWrapper/BioEntitiesResultsList/BioEntitiesPinsList/BioEntitiesPinsListItem/BioEntitiesPinsListItem.component.tsx @@ -18,8 +18,8 @@ import { getSearchData } from '@/redux/search/search.thunks'; import { twMerge } from 'tailwind-merge'; import { getTypeBySBOTerm } from '@/utils/bioEntity/getTypeBySBOTerm'; import { ZERO } from '@/constants/common'; -import { AnnotationItem } from '@/components/Map/Drawer/BioEntityDrawer/AnnotationItem'; import React from 'react'; +import { AnnotationItemList } from '@/components/Map/Drawer/BioEntityDrawer/AnnotationItem/AnnotationItemList.component'; import { PinListBioEntity } from './BioEntitiesPinsListItem.types'; import { isPinWithCoordinates } from './BioEntitiesPinsListItem.utils'; @@ -107,21 +107,7 @@ export const BioEntitiesPinsListItem = ({ Synonyms: <span className="w-full font-normal">{pin.synonyms.join(', ')}</span> </p> )} - {pin.references.length > ZERO && ( - <ul className="leading-6"> - <div className="font-bold">References:</div> - {pin.references.map(reference => ( - <li key={reference.id} className="ml-3"> - <AnnotationItem - key={reference.id} - type={reference.type} - link={reference.link} - resource={reference.resource} - /> - </li> - ))} - </ul> - )} + <AnnotationItemList references={pin.references} /> </div> ); }; -- GitLab