Home > database >  How do I make a mailto that goes to link with email inside of it
How do I make a mailto that goes to link with email inside of it

Time:02-08

I want to make a mailto, but the mailto has to href to "mailto:{item.email}" but ofcourse that is not possible, how can I do this?

{data?.entry.people.map(item => (
            <div key={item.id}>
              <BigText>
                {item.firstName} {item.lastName}
              </BigText>
              <Paragraph>{item.job}</Paragraph>
              <Paragraph>{item.phone}</Paragraph>
              <Paragraph>
                <Link href="mailto:{item.email}">{item.email}</Link>
              </Paragraph>
              <Link href={item.linkedin} target="_blank" rel="nofollow">
                Linkedin
              </Link>
            </div>
          ))}

CodePudding user response:

You can do it with template literals es6

<Link href={`mailto:${item.email}`}>{item.email}</Link>

CodePudding user response:

Try this :

<Link href={`mailto:${item.email}`>{item.email}</Link>
  •  Tags:  
  • Related