- {teamMembers.map((member, index) => (
-
- <_TeamMember
- key={index}
- src={member.src}
- title={member.title}
- position={member.position}
- description={member.description}
- socialIcons={member.socialIcons}
- />
-
- ))}
+ {teamMembers.length > 0 ? (
+ teamMembers.map((member, index) => (
+
+ <_TeamMember
+ src={
+ member.Image && member.Image.url
+ ? `https://webadmin.lilypad.team${member.Image.url}`
+ : "/default-image.png" // Use a default image if none exists
+ }
+ title={member.Name}
+ position={member.Title}
+ description={member.blurb}
+ socialIcons={[
+ { href: `https://twitter.com/${member.twitter}`, iconUrl: "/x.svg" },
+ { href: `https://linkedin.com/in/${member.linkedin}`, iconUrl: "/linkedin.svg" },
+ { href: member.website, iconUrl: mapsAndTravelGlobe02 },
+ ]}
+ />
+
+ ))
+ ) : (
+
No team members found.
+ )}