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

Commit

Permalink
Add support for Taxonomy tag in RegionDetails
Browse files Browse the repository at this point in the history
  • Loading branch information
mihow authored Sep 13, 2023
1 parent 2290ca1 commit 0515e26
Showing 1 changed file with 20 additions and 0 deletions.
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

0 comments on commit 0515e26

Please sign in to comment.