Skip to content
Snippets Groups Projects

Feat/bioentity from map

Merged Mateusz Bolewski requested to merge feat/bioentity-from-map into development
1 unresolved thread
Files
14
import { DrawerHeading } from '@/shared/DrawerHeading';
// import { bioEnititiesResultListSelector } from '@/redux/drawer/drawer.selectors';
import { useAppSelector } from '@/redux/hooks/useAppSelector';
import { searchedFromMapBioEntityElement } from '@/redux/bioEntity/bioEntity.selectors';
import { Icon } from '@/shared/Icon';
export const BioEntityDrawer = (): React.ReactNode => {
const bioEntityData = useAppSelector(searchedFromMapBioEntityElement);
if (!bioEntityData) {
return null;
}
return (
<div className="h-full max-h-full" data-testid="reaction-drawer">
<DrawerHeading
title={
<>
<span className="font-normal">{bioEntityData.stringType}:</span>&nbsp;
{bioEntityData.name}
</>
}
/>
<div className="flex flex-col gap-6 p-6">
<div className="text-sm font-normal">
Compartment: <b className="font-semibold">{bioEntityData.compartment}</b>
</div>
<div className="text-sm font-normal">
Full name: <b className="font-semibold">{bioEntityData.fullName}</b>
</div>
<h3 className="font-semibold">Annotations:</h3>
{bioEntityData.references.map(reference => {
return (
<a
className="pl-3 text-sm font-normal"
href={reference.link?.toString()}
key={reference.id}
target="_blank"
>
<div className="flex justify-between">
<span>
Source:{' '}
<b className="font-semibold">
{reference?.type} ({reference.resource})
</b>
</span>
<Icon name="arrow" className="h-6 w-6 fill-font-500" />
</div>
</a>
);
})}
</div>
</div>
);
};
Loading