Open sixtyniner-official opened 5 years ago
Hi,
on my current project have following function:
_headMetaTagRedered(typename, key, value, index) { switch (typename) { case "MetaLink": return( <link key={index} rel={key} href={value} /> ); case "MetaValue": return( <meta key={index} name={key} content={value}/> ); default: return; } };
Idea is to print all meta tags in one loop
<Head> {data.route.entity.metaTags.map((tag, index) => { return( this._headMetaTagRedered( tag.__typename, tag.key, tag.value, index) ) })} </Head>
But key value for title is MetaValue so is not possible to make right switch case check to print <title>{value}</title>
key
title
MetaValue
<title>{value}</title>
Could you consider the case above and give as feedback if title have to be MetaValue?
Hi, you can add an alias before:
title: tag.__typename
Hi,
on my current project have following function:
Idea is to print all meta tags in one loop
But
key
value fortitle
isMetaValue
so is not possible to make right switch case check to print<title>{value}</title>
Could you consider the case above and give as feedback if
title
have to beMetaValue
?