From: Dessalines Date: Wed, 16 Dec 2020 00:34:14 +0000 (-0600) Subject: Simplifying html tags code. X-Git-Url: http://these/git/%22%7Burl%7D/%7B%60%24%7BghostArchiveUrl%7D/static/git-favicon.png?a=commitdiff_plain;h=6ffe0c530d07548dcbba08d444f215677510ff07;p=lemmy-ui.git Simplifying html tags code. --- diff --git a/src/shared/components/html-tags.tsx b/src/shared/components/html-tags.tsx index ff30fb3..fbde148 100644 --- a/src/shared/components/html-tags.tsx +++ b/src/shared/components/html-tags.tsx @@ -17,39 +17,29 @@ export class HtmlTags extends Component { return ( - {/* Primary Meta Tags */} - + {['title', 'og:title', 'twitter:title'].map(t => ( + + ))} + {['og:url', 'twitter:url'].map(u => ( + + ))} {/* Open Graph / Facebook */} - - {/* Twitter */} - - {/* Optional desc and images */} - {this.props.description && [ - , - , - , - ]} + {this.props.description && + ['description', 'og:description', 'twitter:description'].map(n => ( + + ))} - {this.props.image && [ - , - , - ]} + {this.props.image && + ['og:image', 'twitter:image'].map(p => ( + + ))} ); }