You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Home.jsx 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. //import FormSwitch from '../components/shared/FormSwitch';
  2. import PageHeading from './../components/shared/PageHeading';
  3. import SocialNetworks from '../components/shared/SocialNetworks';
  4. import Contact from '../components/shared/Contact';
  5. import BlogSection from '../components/BlogSection';
  6. import WhyUsCard from '../components/WhyUsCard';
  7. import HiringWidget from '../components/HiringWidget';
  8. import Animation_Diligent from '../assets/animation_diligent.webm';
  9. import '../styles/buttons.css';
  10. import '../styles/cards.css';
  11. //import bg_home from '../assets/logos/bg_home.png';
  12. //import post_1 from '../assets/logos/post_1.png';
  13. import { motion } from 'framer-motion';
  14. import { useState, useEffect, useRef, useLayoutEffect, useContext } from 'react';
  15. import axios from 'axios';
  16. import OrbitOnScroll from '../components/shared/graphics/OrbitOnScroll';
  17. import LandingSVG from '../components/shared/graphics/LandingSVG';
  18. import ServicesHome from '../components/ServicesHome';
  19. import Testimonials from '../components/Testimonials';
  20. import LandingSVGv2 from '../components/shared/graphics/LandingSVG-v2';
  21. import Landing from '../components/Landing';
  22. import WhySection from '../components/WhySection';
  23. import ProcessSection from '../components/ProcessSection';
  24. import TechStack from '../components/TechStack';
  25. import PortfolioSection from '../components/PortfolioSection';
  26. import PageLayout from '../layout/PageLayout';
  27. import MapDilig from '../components/Map';
  28. import useDataApi from '../hooks/useDataApi';
  29. import useAnalytics from '../hooks/useAnalytics';
  30. import ReactHelmet from '../components/shared/ReactHelmet';
  31. import { UIContext } from './../context/index';
  32. import { strapiApiBuilder } from './../utils/strapiApiBuilder';
  33. const api_url = process.env.REACT_APP_API_URL;
  34. const strapiPopulate = [
  35. 'Heading',
  36. 'Heading.subtitle',
  37. 'Heading.title',
  38. 'WhyUsHeading',
  39. 'Cards',
  40. 'Cards.Card1',
  41. 'Cards.Card1.Image',
  42. 'Cards.Card2',
  43. 'Cards.Card2.Image',
  44. 'Cards.Card3',
  45. 'Cards.Card3.Image',
  46. 'HeroNumbers',
  47. 'HeroNumbers.number',
  48. 'ProcessHeading',
  49. 'ProcessImage',
  50. 'TechStackHeading',
  51. 'ProcessMobileImg',
  52. 'ProcessMobileImg.Image',
  53. 'CaseStudies',
  54. 'Map',
  55. 'SEO',
  56. 'SEO.metaSocial',
  57. 'SEO.metaImage',
  58. 'SEO.metaSocial.image',
  59. 'BusinessInquiry',
  60. 'BusinessInquiry.image',
  61. 'ApplyPosition',
  62. 'ApplyPosition.image',
  63. ];
  64. export default function Home({ forwardedRef }) {
  65. const strapi = strapiApiBuilder('w-home-page', strapiPopulate, '');
  66. const [{ data, isLoading, isError }, doFetch] = useDataApi(strapi);
  67. useAnalytics('Home page');
  68. useEffect(() => {
  69. document.title = 'Diligent Software';
  70. }, []);
  71. if (isLoading) {
  72. return (
  73. <div className="z-50 w-full h-screen bg-white dark:bg-dg-primary-1700 overflow-hidden dark:text-white flex items-center justify-center text-3xl font-semibold">
  74. <video id="animation" width="540" height="540" autoPlay muted loop>
  75. <source src={Animation_Diligent} type="video/webm" />
  76. Loading...
  77. </video>
  78. </div>
  79. );
  80. } else {
  81. return (
  82. <PageLayout>
  83. {(data && data.SEO) ? <ReactHelmet seo={data.SEO} /> : null}
  84. <div className="bg-white dark:bg-dg-primary-1700 w-full pt-32 overflow-hidden">
  85. {/* Landing Section */}
  86. {data ? (
  87. <Landing
  88. heading={data.Heading}
  89. numbers={data.HeroNumbers.number}
  90. paragraph={data.paragraph}
  91. button={data.button}
  92. />
  93. ) : null}
  94. {/* Why Us Section */}
  95. {data ? (
  96. <WhySection
  97. heading={data.WhyUsHeading}
  98. p1={data.WhyUsParagraph1}
  99. p2={data.WhyUsParagraph2}
  100. cards={data.Cards}
  101. />
  102. ) : null}
  103. {/* Our Services Section */}
  104. {/* <ServicesHome /> */}
  105. {/* Our Process Section */}
  106. {data ? (
  107. <ProcessSection
  108. heading={data.ProcessHeading}
  109. btn={data.ProcessCTA}
  110. image={data.ProcessImage}
  111. mobileImages={data.ProcessMobileImg.Image}
  112. />
  113. ) : null}
  114. {/* Our Process Section */}
  115. {data ? (
  116. <TechStack heading={data.TechStackHeading} btn={data.TechStackCTA} />
  117. ) : null}
  118. {/* Testimonials Section*/}
  119. {data ? <Testimonials /> : null}
  120. {/* Portfolio Section*/}
  121. {data ? (
  122. <PortfolioSection
  123. heading={data.CaseStudies}
  124. cta={data.CtaForCaseStudiesCards}
  125. />
  126. ) : null}
  127. {/* Contact Section */}
  128. {data ? (
  129. <section id="contact" className="" ref={forwardedRef}>
  130. <Contact
  131. defaultIndex={true}
  132. position={''}
  133. job={data.ApplyPosition}
  134. business={data.BusinessInquiry}
  135. />
  136. </section>
  137. ) : null}
  138. {data ? <MapDilig heading={data.Map} /> : null}
  139. </div>
  140. </PageLayout>
  141. );
  142. }
  143. }