Skip to content
This repository was archived by the owner on Nov 21, 2020. It is now read-only.
This repository was archived by the owner on Nov 21, 2020. It is now read-only.

[QUESTION] Is possible to change __typename for title? #10

Open
@sixtyniner-official

Description

@sixtyniner-official

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>

Could you consider the case above and give as feedback if title have to be MetaValue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions