Fix contact phone tel: links when API returns non-string values.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
bfeb728ff0
commit
4e517fe3b2
@@ -56,16 +56,19 @@ export default async function ContactPage() {
|
||||
<div>
|
||||
<p className="font-bold text-brand-ink">تلفن</p>
|
||||
<div className="mt-1 space-y-1">
|
||||
{phones.map((phone) => (
|
||||
{phones.map((phone) => {
|
||||
const phoneText = String(phone ?? "")
|
||||
return (
|
||||
<a
|
||||
key={phone}
|
||||
href={`tel:${phone.replace(/\s/g, "")}`}
|
||||
key={phoneText}
|
||||
href={`tel:${phoneText.replace(/\s/g, "")}`}
|
||||
className="latin-digits block text-brand"
|
||||
dir="ltr"
|
||||
>
|
||||
{phone}
|
||||
{phoneText}
|
||||
</a>
|
||||
))}
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user