Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.
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
Add support for Taxonomy tag in RegionDetails
  • Loading branch information
mihow authored Sep 13, 2023
commit 0515e2605ea5fde04284a44ae057d6323bbb314f
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