import React, { useEffect, useState } from "react"; import { Link } from "react-router-dom"; import Bredcrumb from "../Bredcrumb/Main"; import BGImg from "../../assets/images/bread_crumb_bg.png"; import BGImg1 from "../../assets/images/bread_crumb_bg_one.png"; import BGImg2 from "../../assets/images/bread_crumb_bg_two.png"; import SiteService from "../../vendors/service/siteService"; const Main = ({ brdcum }) => { let [countries, setCountries] = useState([]) // initial state for country dropdown let countryClass = new SiteService() // instantiating the class const allCountry = () => { return countryClass.countryData(); } //CALLS THE API AFTER COMPONENT LOADS useEffect(()=>{ allCountry().then((data)=> setCountries(Object.values(data.data))) },[]) return ( <> {brdcum.b1 && ( )} {brdcum.b2 && ( )} {brdcum.b5 && ( )} {brdcum.b3 && ( )} {brdcum.b4 && ( )} Leave a message Fill up form below, our team will get back soon Country {countries.length > 0 && countries.map((country, index) => {country})} I agree to the terms and conditions SEND MESSAGE Have any question? If you have any question about our product, service, payment or company, Visit our FAQs page. READ FAQ Email Us example@gmail.com Call Us +1 (888) 553-46-11 Visit Us 5687, Business Avenue, New York, USA 5687 > ); }; export default Main;
Fill up form below, our team will get back soon
If you have any question about our product, service, payment or company, Visit our FAQs page.
5687, Business Avenue, New York, USA 5687