Skip to content

Commit

Permalink
tagging: add url renderer (#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
zbycz authored Apr 16, 2024
1 parent 07c0247 commit 2cbc222
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/components/FeaturePanel/FeaturedTag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,17 @@ const Value = styled.div`
}
`;

const DefaultRenderer = ({ v }) => v;
const renderers: {
type Renderers = {
[key: string]: React.FC<{ k: string; v: string }>;
} = {
};

const DefaultRenderer = ({ v }) => v;
const renderers: Renderers = {
// also updatd in schema – getFeaturedTags()
website: WebsiteRenderer,
'website:2': WebsiteRenderer,
'contact:website': WebsiteRenderer,
url: WebsiteRenderer,
phone: PhoneRenderer,
'contact:phone': PhoneRenderer,
'contact:mobile': PhoneRenderer,
Expand Down
1 change: 1 addition & 0 deletions src/services/tagging/idTaggingScheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ const getFeaturedTags = (feature: Feature) => {
'website',
'website:2',
'contact:website',
'url',
'phone',
'contact:phone',
'contact:mobile',
Expand Down

0 comments on commit 2cbc222

Please sign in to comment.