Adding "( , )" when user has multiple phone numbers.

This commit is contained in:
Kartik Sharma 2025-07-25 14:46:13 +05:30
parent 7709483a76
commit 9ce6da35fb

View File

@ -84,15 +84,19 @@ const ProfileContactDirectory = ({ contact, setOpen_contact, closeModal }) => {
{contactProfile?.contactPhones?.length > 0 && ( {contactProfile?.contactPhones?.length > 0 && (
<div className="d-flex mb-2"> <div className="d-flex mb-2">
<div style={{ width: "100px", minWidth: "110px" }} className="d-flex align-items-center"> <div
style={{ width: "100px", minWidth: "110px" }}
className="d-flex align-items-center"
>
<i className="bx bx-phone bx-xs me-1"></i> <i className="bx bx-phone bx-xs me-1"></i>
<p className="m-0">Phone :</p> <p className="m-0">Phone :</p>
</div> </div>
<div> <div>
<ul className="list-inline mb-0"> <ul className="list-inline mb-0">
{contactProfile?.contactPhones.map((phone, idx) => ( {contactProfile.contactPhones.map((phone, idx) => (
<li className="list-inline-item me-3" key={idx}> <li className="list-inline-item me-1" key={idx}>
{phone.phoneNumber} {phone.phoneNumber}
{idx < contactProfile.contactPhones.length - 1 && ","}
</li> </li>
))} ))}
</ul> </ul>
@ -100,6 +104,7 @@ const ProfileContactDirectory = ({ contact, setOpen_contact, closeModal }) => {
</div> </div>
)} )}
{contactProfile?.createdAt && ( {contactProfile?.createdAt && (
<div className="d-flex mb-2"> <div className="d-flex mb-2">
<div style={{ width: "100px", minWidth: "110px" }} className="d-flex align-items-center"> <div style={{ width: "100px", minWidth: "110px" }} className="d-flex align-items-center">