11import Image from "next/image" ;
2- import { Icon } from "@/components/ui/Icon " ;
2+ import { FiChevronDown , FiMail , FiMapPin , FiPhoneCall } from "react-icons/fi " ;
33import { Container , SectionHeading } from "@/components/ui/SectionHeading" ;
44import {
55 CONTACT_FORM ,
@@ -64,18 +64,19 @@ function FormControl({ field }: { field: ContactField }) {
6464 </ option >
6565 ) ) }
6666 </ select >
67- < Icon
68- name = "chevron-down"
67+ < FiChevronDown
6968 size = { 16 }
7069 className = "pointer-events-none absolute right-3.5 top-1/2 -translate-y-1/2"
70+ aria-hidden
7171 />
7272 </ div >
7373 ) ;
7474 }
7575
76+ const FieldIcon = field . icon ;
7677 return (
7778 < div className = "relative flex h-12 items-center gap-2 rounded-lg border border-neutral-200 bg-white px-3.5 focus-within:border-pesacheck-blue" >
78- { field . icon && < Icon name = { field . icon } size = { 16 } className = "shrink-0" /> }
79+ { FieldIcon && < FieldIcon size = { 16 } className = "shrink-0" aria-hidden /> }
7980 < input
8081 id = { field . name }
8182 name = { field . name }
@@ -88,15 +89,15 @@ function FormControl({ field }: { field: ContactField }) {
8889}
8990
9091function ContactRow ( {
91- icon,
92+ icon : ContactIcon ,
9293 children,
9394} : {
94- icon : string ;
95+ icon : React . ElementType ;
9596 children : React . ReactNode ;
9697} ) {
9798 return (
9899 < div className = "flex items-start gap-2 text-sm font-medium text-neutral-900" >
99- < Icon name = { icon } size = { 24 } className = "mt-px shrink-0" />
100+ < ContactIcon size = { 24 } className = "mt-px shrink-0" aria-hidden />
100101 < span > { children } </ span >
101102 </ div >
102103 ) ;
@@ -145,23 +146,26 @@ export function ContactForm() {
145146
146147 { /* HQ contact details */ }
147148 < div className = "mt-10 flex flex-col gap-3" >
148- < ContactRow icon = "marker-pin" > { CONTACT_HQ . address } </ ContactRow >
149- < ContactRow icon = "mail" > { CONTACT_HQ . email } </ ContactRow >
150- < ContactRow icon = "phone-call" > { CONTACT_HQ . phone } </ ContactRow >
149+ < ContactRow icon = { FiMapPin } > { CONTACT_HQ . address } </ ContactRow >
150+ < ContactRow icon = { FiMail } > { CONTACT_HQ . email } </ ContactRow >
151+ < ContactRow icon = { FiPhoneCall } > { CONTACT_HQ . phone } </ ContactRow >
151152
152153 < div className = "mt-2 flex items-center gap-4" >
153154 < span className = "text-sm font-medium text-neutral-900" >
154155 Follow Us:
155156 </ span >
156157 < div className = "flex items-center gap-3" >
157- { CONTACT_SOCIALS . map ( ( social , i ) => (
158- < div key = { social . name } className = "flex items-center gap-3" >
159- { i > 0 && < span className = "h-2.5 w-px bg-neutral-200" /> }
160- < a href = { social . href } aria-label = { social . label } >
161- < Icon name = { social . name } size = { 24 } alt = { social . label } />
162- </ a >
163- </ div >
164- ) ) }
158+ { CONTACT_SOCIALS . map ( ( social , i ) => {
159+ const SocialIcon = social . icon ;
160+ return (
161+ < div key = { social . label } className = "flex items-center gap-3" >
162+ { i > 0 && < span className = "h-2.5 w-px bg-neutral-200" /> }
163+ < a href = { social . href } aria-label = { social . label } >
164+ < SocialIcon size = { 24 } color = { social . color } aria-hidden />
165+ </ a >
166+ </ div >
167+ ) ;
168+ } ) }
165169 </ div >
166170 </ div >
167171 </ div >
0 commit comments