Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

fix: Show Taxonomy tag value under Region Details #1558

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/components/SidePanels/DetailsPanel/RegionDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ const RatingResult: FC<{mainValue: string[]}> = observer(({ mainValue }) => {
);
});


const TaxonomyResult: FC<{mainValue: string[]}> = observer(({ mainValue }) => {
return (
<Text mark>
{mainValue.join(', ')}
</Text>
);
});

const ResultItem: FC<{result: any}> = observer(({ result }) => {
const { type, mainValue } = result;
/**
Expand Down Expand Up @@ -71,6 +80,17 @@ const ResultItem: FC<{result: any}> = observer(({ result }) => {
</Elem>
</Elem>
);
} else if (type === 'taxonomy') {
return (
<Elem name="result">
<Text>Taxonomy: </Text>
<Elem name="value">
<TaxonomyResult mainValue={mainValue}/>
</Elem>
</Elem>
);
} else {
console.log("Tag type not supported:", type)
}
}, [type, mainValue]);

Expand Down