| import ReCAPTCHA from 'react-google-recaptcha'; | import ReCAPTCHA from 'react-google-recaptcha'; | ||||
| import axios from 'axios'; | import axios from 'axios'; | ||||
| export default function ClientForm({ mg }) { | |||||
| const api_url = process.env.REACT_APP_API_URL; | |||||
| export default function ClientForm({ mg, img }) { | |||||
| //search context for prevous entry TODO | //search context for prevous entry TODO | ||||
| const { clientForm, setClientForm } = useContext(ClientFormContext); | const { clientForm, setClientForm } = useContext(ClientFormContext); | ||||
| const [sucMsg, setSucMsg] = useState(false); | const [sucMsg, setSucMsg] = useState(false); | ||||
| type="submit" | type="submit" | ||||
| className="btn btn_primary transition-all inline-flex justify-center py-4 px-14 border border-transparent shadow-md text-sm font-semibold rounded-xl text-white bg-dg-primary-600 hover:bg-dg-primary-900 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-dg-primary-600" | className="btn btn_primary transition-all inline-flex justify-center py-4 px-14 border border-transparent shadow-md text-sm font-semibold rounded-xl text-white bg-dg-primary-600 hover:bg-dg-primary-900 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-dg-primary-600" | ||||
| > | > | ||||
| Submit | |||||
| {props.cta} | |||||
| </button> | </button> | ||||
| </div> | </div> | ||||
| {sucMsg && ( | {sucMsg && ( | ||||
| exit={{ x: 60, opacity: 0 }} | exit={{ x: 60, opacity: 0 }} | ||||
| transition={{ duration: 0.3, ease: 'easeOut' }} | transition={{ duration: 0.3, ease: 'easeOut' }} | ||||
| > | > | ||||
| <img src={img} alt="Our Team's image" /> | |||||
| <img src={api_url + img.data.attributes.url} alt={img.data.attributes.alternativeText} /> | |||||
| </motion.div> | </motion.div> | ||||
| </div> | </div> | ||||
| </div> | </div> |
| url: 'https://api.eu.mailgun.net', | url: 'https://api.eu.mailgun.net', | ||||
| }); | }); | ||||
| export default function Contact(props) { | |||||
| export default function Contact({job, business, defaultIndex}) { | |||||
| const [tab, setTab] = useState(true); | const [tab, setTab] = useState(true); | ||||
| const [tabTitle, setTabTitle] = useState('Tell Us About Your Idea!'); | |||||
| const [tabTitle, setTabTitle] = useState(business.title); | |||||
| function handleContextMenu(event) { | function handleContextMenu(event) { | ||||
| event.preventDefault(); | event.preventDefault(); | ||||
| function handleTab(tabIndex) { | function handleTab(tabIndex) { | ||||
| if (tabIndex == 0) { | if (tabIndex == 0) { | ||||
| setTab(true); | setTab(true); | ||||
| setTabTitle('Tell Us About Your Idea!'); | |||||
| setTabTitle(business.title); | |||||
| } else { | } else { | ||||
| setTab(false); | setTab(false); | ||||
| setTabTitle('Join Diligent!'); | |||||
| setTabTitle(job.title); | |||||
| } | } | ||||
| } | } | ||||
| const api_url = process.env.REACT_APP_API_URL; | const api_url = process.env.REACT_APP_API_URL; | ||||
| let defaultPositionSelection = props.defaultPositionSelection; | |||||
| let defaultPositionSelection = null; | |||||
| const [clientForm, setClientForm] = useState(initialClientValues); | const [clientForm, setClientForm] = useState(initialClientValues); | ||||
| const [jobForm, setJobForm] = useState(initialJobValues); | const [jobForm, setJobForm] = useState(initialJobValues); | ||||
| <div className="py-16 relative"> | <div className="py-16 relative"> | ||||
| <div className="flex justify-end flex-col"> | <div className="flex justify-end flex-col"> | ||||
| <Tab.Group | <Tab.Group | ||||
| defaultIndex={props.defaultIndex} | |||||
| defaultIndex={defaultIndex} | |||||
| onChange={index => handleTab(index)} | onChange={index => handleTab(index)} | ||||
| > | > | ||||
| <div | <div | ||||
| {tab ? ( | {tab ? ( | ||||
| <PageTitle | <PageTitle | ||||
| left | left | ||||
| heading={'Tell Us About Your Idea!'} | |||||
| subheading={'Contact us'} | |||||
| heading={business.title} | |||||
| subheading={business.subtitle} | |||||
| /> | /> | ||||
| ) : ( | ) : ( | ||||
| <PageTitle left heading={'Join Diligent!'} subheading={'Cotact us'} /> | |||||
| <PageTitle left heading={job.title} subheading={job.title} /> | |||||
| )} | )} | ||||
| <Tab.List className="flex flex-row items-center md:flex-col lg:flex-row h-fit w-fit max-w-max md:ml-auto z-20 p-1 min-h-12 space-x-1 bg-dg-primary-400 rounded-xl my-4 align-middle"> | <Tab.List className="flex flex-row items-center md:flex-col lg:flex-row h-fit w-fit max-w-max md:ml-auto z-20 p-1 min-h-12 space-x-1 bg-dg-primary-400 rounded-xl my-4 align-middle"> | ||||
| <Tab.Panels className="w-full mt-2 mx-auto"> | <Tab.Panels className="w-full mt-2 mx-auto"> | ||||
| <Tab.Panel className={classNames('py-3', 'outline-none')}> | <Tab.Panel className={classNames('py-3', 'outline-none')}> | ||||
| <ClientFormContext.Provider value={{ clientForm, setClientForm }}> | <ClientFormContext.Provider value={{ clientForm, setClientForm }}> | ||||
| <ClientForm mg={mg} /> | |||||
| <ClientForm mg={mg} | |||||
| cta={business.cta} | |||||
| img={business.image} /> | |||||
| </ClientFormContext.Provider> | </ClientFormContext.Provider> | ||||
| </Tab.Panel> | </Tab.Panel> | ||||
| <Tab.Panel className={classNames('py-3', 'outline-none')}> | <Tab.Panel className={classNames('py-3', 'outline-none')}> | ||||
| <JobFormContext.Provider value={{ jobForm, setJobForm }}> | <JobFormContext.Provider value={{ jobForm, setJobForm }}> | ||||
| <JobForm | <JobForm | ||||
| cta={job.cta} | |||||
| img={job.image} | |||||
| cntCareers={cntCareers} | cntCareers={cntCareers} | ||||
| defaultPositionSelection={defaultPositionSelection} | defaultPositionSelection={defaultPositionSelection} | ||||
| mg={mg} | mg={mg} |
| import ReCAPTCHA from 'react-google-recaptcha'; | import ReCAPTCHA from 'react-google-recaptcha'; | ||||
| import axios from 'axios'; | import axios from 'axios'; | ||||
| const api_url = process.env.REACT_APP_API_URL; | |||||
| export default function JobForm(props) { | export default function JobForm(props) { | ||||
| const [sucMsg, setSucMsg] = useState(false); | const [sucMsg, setSucMsg] = useState(false); | ||||
| const captchaRef = useRef(null); | const captchaRef = useRef(null); | ||||
| type="submit" | type="submit" | ||||
| className="btn btn_primary transition-all inline-flex justify-center py-4 px-14 border border-transparent shadow-md text-sm font-semibold rounded-xl text-white bg-dg-primary-600 hover:bg-dg-primary-900 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-dg-primary-600" | className="btn btn_primary transition-all inline-flex justify-center py-4 px-14 border border-transparent shadow-md text-sm font-semibold rounded-xl text-white bg-dg-primary-600 hover:bg-dg-primary-900 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-dg-primary-600" | ||||
| > | > | ||||
| Submit | |||||
| {props.cta} | |||||
| </button> | </button> | ||||
| </div> | </div> | ||||
| {sucMsg && ( | {sucMsg && ( | ||||
| exit={{ x: 60, opacity: 0 }} | exit={{ x: 60, opacity: 0 }} | ||||
| transition={{ duration: 0.3, ease: 'easeOut' }} | transition={{ duration: 0.3, ease: 'easeOut' }} | ||||
| > | > | ||||
| <img src={img} alt="Our Team's image" /> | |||||
| <img src={api_url + props.img.data.attributes.url} alt={props.img.data.attributes.alternativeText} /> | |||||
| </motion.div> | </motion.div> | ||||
| </div> | </div> | ||||
| </div> | </div> |
| import ReactHelmet from '../components/shared/ReactHelmet'; | import ReactHelmet from '../components/shared/ReactHelmet'; | ||||
| const api_url = process.env.REACT_APP_API_URL; | const api_url = process.env.REACT_APP_API_URL; | ||||
| // const fieldArray = [ | |||||
| // 'landing', | |||||
| // 'why', | |||||
| // 'why.heading', | |||||
| // 'why.card_left.icon', | |||||
| // 'why.card_mid.icon', | |||||
| // 'why.card_right.icon', | |||||
| // 'landing.heading', | |||||
| // 'SEO', | |||||
| // 'SEO.metaSocial', | |||||
| // 'SEO.metaImage', | |||||
| // 'SEO.metaSocial.image', | |||||
| // ]; | |||||
| const strapiPopulate = [ | const strapiPopulate = [ | ||||
| 'Heading', | 'Heading', | ||||
| </Tab.Group> */} | </Tab.Group> */} | ||||
| {/* Landing Section */} | {/* Landing Section */} | ||||
| {data ? | |||||
| <Landing heading={data.Heading} numbers={data.HeroNumbers.number} paragraph={data.paragraph} button={data.button} /> | |||||
| : null | |||||
| } | |||||
| {data ? ( | |||||
| <Landing | |||||
| heading={data.Heading} | |||||
| numbers={data.HeroNumbers.number} | |||||
| paragraph={data.paragraph} | |||||
| button={data.button} | |||||
| /> | |||||
| ) : null} | |||||
| {/* Why Us Section */} | {/* Why Us Section */} | ||||
| {data ? | |||||
| <WhySection heading={data.WhyUsHeading} p1={data.WhyUsParagraph1} p2={data.WhyUsParagraph2} cards={data.Cards} /> | |||||
| : null | |||||
| } | |||||
| {data ? ( | |||||
| <WhySection | |||||
| heading={data.WhyUsHeading} | |||||
| p1={data.WhyUsParagraph1} | |||||
| p2={data.WhyUsParagraph2} | |||||
| cards={data.Cards} | |||||
| /> | |||||
| ) : null} | |||||
| {/* Our Services Section */} | {/* Our Services Section */} | ||||
| {/* <ServicesHome /> */} | {/* <ServicesHome /> */} | ||||
| {/* Our Process Section */} | {/* Our Process Section */} | ||||
| {data ? | |||||
| <ProcessSection heading={data.ProcessHeading} btn={data.ProcessCTA} image={data.ProcessImage} mobileImages={data.ProcessMobileImg.Image} /> | |||||
| : null | |||||
| } | |||||
| {data ? ( | |||||
| <ProcessSection | |||||
| heading={data.ProcessHeading} | |||||
| btn={data.ProcessCTA} | |||||
| image={data.ProcessImage} | |||||
| mobileImages={data.ProcessMobileImg.Image} | |||||
| /> | |||||
| ) : null} | |||||
| {/* Our Process Section */} | {/* Our Process Section */} | ||||
| {data ? | |||||
| <TechStack heading={data.TechStackHeading} btn={data.TechStackCTA} /> | |||||
| : null | |||||
| } | |||||
| {data ? ( | |||||
| <TechStack heading={data.TechStackHeading} btn={data.TechStackCTA} /> | |||||
| ) : null} | |||||
| {/* Testimonials Section*/} | {/* Testimonials Section*/} | ||||
| {data ? | |||||
| <Testimonials /> | |||||
| : null | |||||
| } | |||||
| {data ? <Testimonials /> : null} | |||||
| {/* Portfolio Section*/} | {/* Portfolio Section*/} | ||||
| {data ? | |||||
| <PortfolioSection heading={data.CaseStudies} cta={data.CtaForCaseStudiesCards} /> | |||||
| : null | |||||
| } | |||||
| {data ? ( | |||||
| <PortfolioSection | |||||
| heading={data.CaseStudies} | |||||
| cta={data.CtaForCaseStudiesCards} | |||||
| /> | |||||
| ) : null} | |||||
| {/* Contact Section */} | {/* Contact Section */} | ||||
| <section id="contact" className="" ref={forwardedRef}> | |||||
| <Contact defaultIndex={0} /> | |||||
| </section> | |||||
| {data ? ( | |||||
| <section id="contact" className="" ref={forwardedRef}> | |||||
| <Contact | |||||
| defaultIndex={0} | |||||
| job={data.ApplyPosition} | |||||
| business={data.BusinessInquiry} | |||||
| /> | |||||
| </section> | |||||
| ) : null} | |||||
| <MapDilig /> | <MapDilig /> | ||||
| </div> | </div> | ||||
| </PageLayout> | </PageLayout> | ||||
| ); | ); | ||||
| } | } | ||||
| } | |||||
| } |