
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeThis is a JSX templating syntax issue. You need to use template literals or string concatenation to properly interpolate the phone number variable.
Change this:
<a href="tel:{item.phone}">Call Person</a>To this:
<a href={`tel:${item.phone}`}>Call Person</a>Your complete map should look like:
{array.map((item) => (
<a key={item._id} href={`tel:${item.phone}`}>Call Person</a>
))}The key points:
${item.phone} to interpolate the variablehref value should be wrapped in curly braces {}key prop (using item._id or another unique identifier) to avoid React warnings() instead of curly braces for implicit return in your arrow functionSince you're pulling data from Sanity via GraphQL, just make sure your phone field is included in your GraphQL query and the data structure matches what you're accessing.
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store